Home » date » 2009 » Dec » 11 »

Seizoenale decompositie met de Loess techniek

*The author of this computation has been verified*
R Software Module: /rwasp_decomposeloess.wasp (opens new window with default values)
Title produced by software: Decomposition by Loess
Date of computation: Fri, 11 Dec 2009 09:44:09 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Dec/11/t12605499008i5ctgndcddg58c.htm/, Retrieved Fri, 11 Dec 2009 17:45:05 +0100
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2009/Dec/11/t12605499008i5ctgndcddg58c.htm/},
    year = {2009},
}
@Manual{R,
    title = {R: A Language and Environment for Statistical Computing},
    author = {{R Development Core Team}},
    organization = {R Foundation for Statistical Computing},
    address = {Vienna, Austria},
    year = {2009},
    note = {{ISBN} 3-900051-07-0},
    url = {http://www.R-project.org},
}
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
21790 13253 37702 30364 32609 30212 29965 28352 25814 22414 20506 28806 22228 13971 36845 35338 35022 34777 26887 23970 22780 17351 21382 24561 17409 11514 31514 27071 29462 26105 22397 23843 21705 18089 20764 25316 17704 15548 28029 29383 36438 32034 22679 24319 18004 17537 20366 22782 19169 13807 29743 25591 29096 26482 22405 27044 17970 18730 19684 19785 18479 10698 31956 29506 34506 27165 26736 23691 18157 17328 18205 20995 17382 9367 31124 26551 30651 25859 25100 25778 20418 18688 20424 24776 19814 12738 31566 30111 30019 31934 25826 26835 20205 17789 20520 22518 15572 11509 25447 24090 27786 26195 20516 22759 19028 16971 20036 22485 18730
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Seasonal Decomposition by Loess - Parameters
ComponentWindowDegreeJump
Seasonal10910110
Trend1912
Low-pass1312


Seasonal Decomposition by Loess - Time Series Components
tObservedFittedSeasonalTrendRemainder
12179022279.4514224485-4969.1044250470126269.6530025985489.451422448474
21325311506.5592112009-11364.748377824926364.189166624-1746.44078879906
33770241206.80797222237738.4666971282326458.72533064953504.80797222231
43036429294.01236450754879.487155239926554.5004802526-1069.98763549248
53260930602.21616794537965.5082021989726650.2756298557-2006.78383205466
63021228463.2640564465219.7579495798526740.9779939742-1748.73594355401
72996532116.0881315082982.23151039914726831.68035809262151.08813150824
82835228309.81638993071469.0239738706426925.1596361987-42.1836100693399
92581427830.2136858763-3220.8526001811327018.63891430482016.21368587635
102241422971.1822369874-5311.6816780917927168.4994411044557.182236987392
112050617076.8184255081-3383.1783934121127318.359967904-3429.1815744919
122880630201.4561371599-4.9096438419578827415.45350668211395.45613715985
132222821912.5573795868-4969.1044250470127512.5470454602-315.442620413185
141397111935.5654279328-11364.748377824927371.1829498922-2035.43457206722
153684538721.71444854767738.4666971282327229.81885432411876.71444854765
163533838811.61080302724879.487155239926984.90204173293473.61080302721
173502235338.50656865947965.5082021989726739.9852291417316.506568659363
183477737906.21873497615219.7579495798526428.02331544403129.21873497610
192688726675.7070878544982.23151039914726116.0614017464-211.29291214556
202397020788.79506040751469.0239738706425682.1809657219-3181.20493959254
212278023532.5520704838-3220.8526001811325248.3005296974752.552070483751
221735115284.5387127359-5311.6816780917924729.1429653559-2066.46128726415
232138221937.1929923976-3383.1783934121124209.9854010145555.19299239762
242456125358.7008577858-4.9096438419578823768.2087860561797.700857785814
251740916460.6722539492-4969.1044250470123326.4321710978-948.32774605079
261151411291.8903959135-11364.748377824923100.8579819114-222.109604086487
273151432414.24951014677738.4666971282322875.2837927251900.249510146718
282707126438.99556801384879.487155239922823.5172767463-632.004431986214
292946228186.74103703357965.5082021989722771.7507607676-1275.25896296654
302610524157.2715015535219.7579495798522832.9705488672-1947.72849844701
312239720917.5781526341982.23151039914722894.1903369667-1479.42184736589
322384323198.00687008801469.0239738706423018.9691560413-644.993129911978
332170523487.1046250652-3220.8526001811323143.74797511591782.10462506520
341808918103.4907883817-5311.6816780917923386.190889710114.4907883817323
352076421282.5445891079-3383.1783934121123628.6338043042518.544589107922
362531626743.1277767362-4.9096438419578823893.78186710581427.12777673619
371770416218.1744951397-4969.1044250470124158.9299299074-1485.82550486034
381554818253.3242094717-11364.748377824924207.42416835332705.32420947166
392802924063.61489607267738.4666971282324255.9184067992-3965.38510392744
402938329747.06338968384879.487155239924139.4494550763364.063389683757
413643840887.51129444767965.5082021989724022.98050335354449.51129444755
423203434919.06996391745219.7579495798523929.17208650272885.06996391742
432267920540.4048199489982.23151039914723835.363669652-2138.59518005112
442431923434.20919952911469.0239738706423734.7668266003-884.790800470924
451800415594.6826166325-3220.8526001811323634.1699835486-2409.31738336746
461753716981.8984633569-5311.6816780917923403.7832147349-555.101536643098
472036620941.7819474909-3383.1783934121123173.3964459212575.781947490934
482278222632.3387146269-4.9096438419578822936.5709292150-149.661285373069
491916920607.3590125381-4969.1044250470122699.74541250891438.35901253813
501380716319.0215261833-11364.748377824922659.72685164162512.02152618329
512974329127.82501209747738.4666971282322619.7082907744-615.174987902643
522559123704.71964928564879.487155239922597.7931954745-1886.28035071444
532909627650.61369762647965.5082021989722575.8781001747-1445.38630237363
542648225257.65299311325219.7579495798522486.589057307-1224.34700688684
552240521430.4684751616982.23151039914722397.3000144393-974.531524838447
562704430219.67890899891469.0239738706422399.29711713043175.67890899895
571797016759.5583803596-3220.8526001811322401.2942198215-1210.44161964040
581873020174.2804751038-5311.6816780917922597.4012029881444.28047510380
591968419957.6702072577-3383.1783934121122793.5081861544273.670207257663
601978516578.9439782000-4.9096438419578822995.9656656419-3206.05602179998
611847918728.6812799176-4969.1044250470123198.4231451294249.681279917582
62106989503.116288489-11364.748377824923257.6320893359-1194.883711511
633195632856.69226932937738.4666971282323316.8410335424900.692269329324
642950630838.58051478194879.487155239923293.93232997821332.5805147819
653450637775.46817138717965.5082021989723271.02362641403269.46817138708
662716525915.88887637615219.7579495798523194.3531740441-1249.11112362394
672673629372.0857679266982.23151039914723117.68272167422636.08576792664
682369122956.37670072391469.0239738706422956.5993254054-734.623299276063
691815716739.3366710445-3220.8526001811322795.5159291366-1417.66332895551
701732817385.6075022776-5311.6816780917922582.074175814257.6075022776095
711820517424.5459709204-3383.1783934121122368.6324224917-780.454029079614
722099519750.2919950398-4.9096438419578822244.6176488021-1244.70800496018
731738217612.5015499345-4969.1044250470122120.6028751126230.501549934452
7493677918.7687710315-11364.748377824922179.9796067934-1448.2312289685
753112432270.17696439757738.4666971282322239.35633847431146.17696439745
762655125793.09304680584879.487155239922429.4197979543-757.906953194215
773065130717.00854036677965.5082021989722619.483257434366.0085403667144
782585923642.15889122855219.7579495798522856.0831591916-2216.84110877147
792510026125.0854286519982.23151039914723092.68306094891025.08542865194
802577826769.67071723531469.0239738706423317.3053088940991.670717235316
812041820514.9250433420-3220.8526001811323541.927556839296.925043341951
821868818963.0548139022-5311.6816780917923724.6268641896275.054813902181
832042420323.8522218721-3383.1783934121123907.3261715400-100.147778127925
842477625489.6547470625-4.9096438419578824067.2548967794713.654747062541
851981420369.9208030282-4969.1044250470124227.1836220188555.92080302821
861273812534.6599947769-11364.748377824924306.0883830481-203.340005223126
873156631008.54015879447738.4666971282324384.9931440773-557.459841205557
883011130976.50217630054879.487155239924366.0106684596865.502176300459
893001927725.46360495917965.5082021989724347.0281928420-2293.53639504093
903193434444.74837967175219.7579495798524203.49367074852510.74837967168
912582626609.8093409459982.23151039914724059.959148655783.809340945878
922683528428.47162529581469.0239738706423772.50440083361593.47162529575
932020520145.8029471689-3220.8526001811323485.0496530123-59.1970528311176
941778917818.7926350153-5311.6816780917923070.889043076529.7926350152593
952052021766.4499602713-3383.1783934121122656.72843314081246.44996027130
962251822827.4322232011-4.9096438419578822213.4774206409309.432223201085
971557214342.8780169061-4969.1044250470121770.2264081409-1229.12198309393
981150912936.1894583820-11364.748377824921446.55891944301427.18945838198
992544722032.64187212687738.4666971282321122.8914307450-3414.3581278732
1002409022189.02715690964879.487155239921111.4856878505-1900.97284309044
1012778626506.41185284497965.5082021989721100.0799449561-1279.58814715508
1022619525905.72843483175219.7579495798521264.5136155885-289.271565168343
1032051618620.8212033800982.23151039914721428.9472862209-1895.17879662002
1042275922428.87919036961469.0239738706421620.0968357598-330.1208096304
1051902819465.6062148825-3220.8526001811321811.2463852987437.606214882479
1061697117210.7677032240-5311.6816780917922042.9139748678239.767703223981
1072003621180.5968289751-3383.1783934121122274.58156443701144.59682897515
1082248522430.1033027007-4.9096438419578822544.8063411412-54.8966972992748
1091873019614.0733072015-4969.1044250470122815.0311178455884.073307201506
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/11/t12605499008i5ctgndcddg58c/1bisu1260549846.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/11/t12605499008i5ctgndcddg58c/1bisu1260549846.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/11/t12605499008i5ctgndcddg58c/2km3f1260549846.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/11/t12605499008i5ctgndcddg58c/2km3f1260549846.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/11/t12605499008i5ctgndcddg58c/336o81260549846.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/11/t12605499008i5ctgndcddg58c/336o81260549846.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/11/t12605499008i5ctgndcddg58c/45sqe1260549846.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/11/t12605499008i5ctgndcddg58c/45sqe1260549846.ps (open in new window)


 
Parameters (Session):
par1 = 12 ; par2 = periodic ; par3 = 0 ; par5 = 1 ; par7 = 1 ; par8 = FALSE ;
 
Parameters (R input):
par1 = 12 ; par2 = periodic ; par3 = 0 ; par5 = 1 ; par7 = 1 ; par8 = FALSE ;
 
R code (references can be found in the software module):
par1 <- as.numeric(par1) #seasonal period
if (par2 != 'periodic') par2 <- as.numeric(par2) #s.window
par3 <- as.numeric(par3) #s.degree
if (par4 == '') par4 <- NULL else par4 <- as.numeric(par4)#t.window
par5 <- as.numeric(par5)#t.degree
if (par6 != '') par6 <- as.numeric(par6)#l.window
par7 <- as.numeric(par7)#l.degree
if (par8 == 'FALSE') par8 <- FALSE else par9 <- TRUE #robust
nx <- length(x)
x <- ts(x,frequency=par1)
if (par6 != '') {
m <- stl(x,s.window=par2, s.degree=par3, t.window=par4, t.degre=par5, l.window=par6, l.degree=par7, robust=par8)
} else {
m <- stl(x,s.window=par2, s.degree=par3, t.window=par4, t.degre=par5, l.degree=par7, robust=par8)
}
m$time.series
m$win
m$deg
m$jump
m$inner
m$outer
bitmap(file='test1.png')
plot(m,main=main)
dev.off()
mylagmax <- nx/2
bitmap(file='test2.png')
op <- par(mfrow = c(2,2))
acf(as.numeric(x),lag.max = mylagmax,main='Observed')
acf(as.numeric(m$time.series[,'trend']),na.action=na.pass,lag.max = mylagmax,main='Trend')
acf(as.numeric(m$time.series[,'seasonal']),na.action=na.pass,lag.max = mylagmax,main='Seasonal')
acf(as.numeric(m$time.series[,'remainder']),na.action=na.pass,lag.max = mylagmax,main='Remainder')
par(op)
dev.off()
bitmap(file='test3.png')
op <- par(mfrow = c(2,2))
spectrum(as.numeric(x),main='Observed')
spectrum(as.numeric(m$time.series[!is.na(m$time.series[,'trend']),'trend']),main='Trend')
spectrum(as.numeric(m$time.series[!is.na(m$time.series[,'seasonal']),'seasonal']),main='Seasonal')
spectrum(as.numeric(m$time.series[!is.na(m$time.series[,'remainder']),'remainder']),main='Remainder')
par(op)
dev.off()
bitmap(file='test4.png')
op <- par(mfrow = c(2,2))
cpgram(as.numeric(x),main='Observed')
cpgram(as.numeric(m$time.series[!is.na(m$time.series[,'trend']),'trend']),main='Trend')
cpgram(as.numeric(m$time.series[!is.na(m$time.series[,'seasonal']),'seasonal']),main='Seasonal')
cpgram(as.numeric(m$time.series[!is.na(m$time.series[,'remainder']),'remainder']),main='Remainder')
par(op)
dev.off()
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Seasonal Decomposition by Loess - Parameters',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Component',header=TRUE)
a<-table.element(a,'Window',header=TRUE)
a<-table.element(a,'Degree',header=TRUE)
a<-table.element(a,'Jump',header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Seasonal',header=TRUE)
a<-table.element(a,m$win['s'])
a<-table.element(a,m$deg['s'])
a<-table.element(a,m$jump['s'])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Trend',header=TRUE)
a<-table.element(a,m$win['t'])
a<-table.element(a,m$deg['t'])
a<-table.element(a,m$jump['t'])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Low-pass',header=TRUE)
a<-table.element(a,m$win['l'])
a<-table.element(a,m$deg['l'])
a<-table.element(a,m$jump['l'])
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Seasonal Decomposition by Loess - Time Series Components',6,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'t',header=TRUE)
a<-table.element(a,'Observed',header=TRUE)
a<-table.element(a,'Fitted',header=TRUE)
a<-table.element(a,'Seasonal',header=TRUE)
a<-table.element(a,'Trend',header=TRUE)
a<-table.element(a,'Remainder',header=TRUE)
a<-table.row.end(a)
for (i in 1:nx) {
a<-table.row.start(a)
a<-table.element(a,i,header=TRUE)
a<-table.element(a,x[i])
a<-table.element(a,x[i]+m$time.series[i,'remainder'])
a<-table.element(a,m$time.series[i,'seasonal'])
a<-table.element(a,m$time.series[i,'trend'])
a<-table.element(a,m$time.series[i,'remainder'])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable1.tab')
 





Copyright

Creative Commons License

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.

Software written by Ed van Stee & Patrick Wessa


Disclaimer

Information provided on this web site is provided "AS IS" without warranty of any kind, either express or implied, including, without limitation, warranties of merchantability, fitness for a particular purpose, and noninfringement. We use reasonable efforts to include accurate and timely information and periodically update the information, and software without notice. However, we make no warranties or representations as to the accuracy or completeness of such information (or software), and we assume no liability or responsibility for errors or omissions in the content of this web site, or any software bugs in online applications. Your use of this web site is AT YOUR OWN RISK. Under no circumstances and under no legal theory shall we be liable to you or any other person for any direct, indirect, special, incidental, exemplary, or consequential damages arising from your access to, or use of, this web site.


Privacy Policy

We may request personal information to be submitted to our servers in order to be able to:

  • personalize online software applications according to your needs
  • enforce strict security rules with respect to the data that you upload (e.g. statistical data)
  • manage user sessions of online applications
  • alert you about important changes or upgrades in resources or applications

We NEVER allow other companies to directly offer registered users information about their products and services. Banner references and hyperlinks of third parties NEVER contain any personal data of the visitor.

We do NOT sell, nor transmit by any means, personal information, nor statistical data series uploaded by you to third parties.

We carefully protect your data from loss, misuse, alteration, and destruction. However, at any time, and under any circumstance you are solely responsible for managing your passwords, and keeping them secret.

We store a unique ANONYMOUS USER ID in the form of a small 'Cookie' on your computer. This allows us to track your progress when using this website which is necessary to create state-dependent features. The cookie is used for NO OTHER PURPOSE. At any time you may opt to disallow cookies from this website - this will not affect other features of this website.

We examine cookies that are used by third-parties (banner and online ads) very closely: abuse from third-parties automatically results in termination of the advertising contract without refund. We have very good reason to believe that the cookies that are produced by third parties (banner ads) do NOT cause any privacy or security risk.

FreeStatistics.org is safe. There is no need to download any software to use the applications and services contained in this website. Hence, your system's security is not compromised by their use, and your personal data - other than data you submit in the account application form, and the user-agent information that is transmitted by your browser - is never transmitted to our servers.

As a general rule, we do not log on-line behavior of individuals (other than normal logging of webserver 'hits'). However, in cases of abuse, hacking, unauthorized access, Denial of Service attacks, illegal copying, hotlinking, non-compliance with international webstandards (such as robots.txt), or any other harmful behavior, our system engineers are empowered to log, track, identify, publish, and ban misbehaving individuals - even if this leads to ban entire blocks of IP addresses, or disclosing user's identity.


FreeStatistics.org is powered by