Home » date » 2009 » Dec » 03 »

workshop 9 berekening 6

*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: Thu, 03 Dec 2009 10:54:46 -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/03/t12598629279gv7ix2is1qr9fq.htm/, Retrieved Thu, 03 Dec 2009 18:55:33 +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/03/t12598629279gv7ix2is1qr9fq.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 «
4716.99 4926.65 4920.10 5170.09 5246.24 5283.61 4979.05 4825.20 4695.12 4711.54 4727.22 4384.96 4378.75 4472.93 4564.07 4310.54 4171.38 4049.38 3591.37 3720.46 4107.23 4101.71 4162.34 4136.22 4125.88 4031.48 3761.36 3408.56 3228.47 3090.45 2741.14 2980.44 3104.33 3181.57 2863.86 2898.01 3112.33 3254.33 3513.47 3587.61 3727.45 3793.34 3817.58 3845.13 3931.86 4197.52 4307.13 4229.43 4362.28 4217.34 4361.28 4327.74 4417.65 4557.68 4650.35 4967.18 5123.42 5290.85 5535.66 5514.06 5493.88 5694.83 5850.41 6116.64 6175.00 6513.58 6383.78 6673.66 6936.61 7300.68 7392.93 7497.31 7584.71 7160.79 7196.19 7245.63 7347.51 7425.75 7778.51 7822.33 8181.22 8371.47 8347.71 8672.11 8802.79 9138.46 9123.29 9023.21 8850.41 8864.58 9163.74 8516.66 8553.44 7555.20 7851.22 7442.00 7992.53 8264.04 7517.39 7200.40 7193.69 6193.58 5104.21 4800.46 4461.61 4398.59 4243.63 4293.82
 
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
Seasonal10810109
Trend1912
Low-pass1312


Seasonal Decomposition by Loess - Time Series Components
tObservedFittedSeasonalTrendRemainder
14716.994338.4205784131455.42886517781085040.13055640905-378.569421586862
24926.654713.49299084938125.2042545657425014.60275458488-213.157009150625
34920.14761.0339086627290.0911385765654989.07495276072-159.066091337280
45170.095329.2865313482753.82609390054224957.06737475119159.196531348271
55246.245507.1347282950460.2854749633024925.05979674166260.894728295041
65283.615675.575623594941.376052289899924890.26832411516391.965623594941
74979.055268.64204696551-166.018898454174855.47685148866289.59204696551
84825.24995.98984245107-165.5662756841914819.97643323312170.789842451069
94695.124659.59658761483-53.83260259241614784.47601497758-35.5234123851687
104711.544738.37007576279-33.84517193619914718.5550961734126.8300757627912
114727.224781.4103757274820.39544690328964652.6341773692354.1903757274804
124384.964198.3625938693112.65544681294244558.90195931774-186.597406130687
134378.754236.9013935559355.42886517781084465.16974126626-141.848606444069
144472.934439.18323198675125.2042545657424381.47251344751-33.7467680132495
154564.074740.2735757946890.0911385765654297.77528562876176.203575794676
164310.544324.7479450795553.82609390054224242.5059610199114.2079450795454
174171.384095.2378886256360.2854749633024187.23663641107-76.1421113743672
184049.383944.744450429161.376052289899924152.63949728094-104.635549570839
193591.373230.71654030336-166.018898454174118.04235815081-360.653459696643
203720.463525.28946838467-165.5662756841914081.19680729952-195.170531615332
214107.234223.94134614418-53.83260259241614044.35125644823116.711346144183
224101.714248.67005716257-33.84517193619913988.59511477363146.960057162572
234162.344371.4455799976920.39544690328963932.83897309902209.105579997688
244136.224400.5222567763812.65544681294243859.26229641067264.302256776384
254125.884410.6455150998655.42886517781083785.68561972233284.765515099863
264031.484238.97659647825125.2042545657423698.77914895601207.496596478247
273761.363820.7561832337490.0911385765653611.872678189759.3961832337382
283408.563249.4505365799853.82609390054223513.84336951948-159.109463420021
293228.472980.8404641874460.2854749633023415.81406084926-247.629535812563
303090.452855.091835395691.376052289899923324.43211231441-235.358164604309
312741.142415.24873467461-166.018898454173233.05016377956-325.891265325388
322980.442945.535761135-165.5662756841913180.91051454919-34.9042388650009
333104.333133.72173727359-53.83260259241613128.7708653188329.3917372735891
343181.573260.21780175005-33.84517193619913136.7673701861578.6478017500535
352863.862562.5606780432520.39544690328963144.76387505346-301.299321956754
362898.012583.1582042697612.65544681294243200.20634891729-314.851795730237
373112.332913.5823120410755.42886517781083255.64882278112-198.747687958934
383254.333046.86195523638125.2042545657423336.59379019788-207.46804476362
393513.473519.310103808890.0911385765653417.538757614635.84010380880181
403587.613603.5421190150953.82609390054223517.8517870843715.9321190150881
413727.453776.4497084825960.2854749633023618.1648165541148.9997084825918
423793.343860.111973335551.376052289899923725.1919743745566.7719733355507
433817.583968.95976625918-166.018898454173832.21913219499151.379766259177
443845.133937.16721505402-165.5662756841913918.6590606301792.0372150540247
453931.863912.45361352708-53.83260259241614005.09898906534-19.4063864729246
464197.524360.70853490986-33.84517193619914068.17663702634163.188534909864
474307.134462.6102681093820.39544690328964131.25428498733155.480268109380
484229.434254.4762412544212.65544681294244191.7283119326425.0462412544202
494362.284416.9287959442455.42886517781084252.2023388779454.6487959442447
504217.343980.54554489313125.2042545657424328.93020054113-236.794455106868
514361.284226.8107992191390.0911385765654405.65806220431-134.469200780874
524327.744098.4796758700853.82609390054224503.17423022938-229.260324129918
534417.654174.3241267822660.2854749633024600.69039825444-243.325873217742
544557.684400.747948503881.376052289899924713.23599920622-156.932051496117
554650.354640.93729829617-166.018898454174825.781600158-9.4127017038254
564967.185148.32611854529-165.5662756841914951.6001571389181.146118545291
575123.425223.25388847261-53.83260259241615077.4187141198099.8338884726118
585290.855401.43454954525-33.84517193619915214.11062239095110.584549545245
595535.665700.122022434620.39544690328965350.80253066210164.462022434605
605514.065522.5747863290912.65544681294245492.889766857978.5147863290913
615493.885297.3541317683655.42886517781085634.97700305383-196.52586823164
625694.835482.9956371608125.2042545657425781.46010827346-211.834362839200
635850.415682.7856479303590.0911385765655927.94321349309-167.624352069654
646116.646090.5816755752553.82609390054226088.87223052421-26.0583244247518
6561756039.9132774813760.2854749633026249.80124755533-135.086722518632
666513.586607.768033081351.376052289899926418.0159146287594.1880330813465
676383.786347.348316752-166.018898454176586.23058170218-36.4316832480063
686673.666782.66155087675-165.5662756841916730.22472480744109.001550876751
696936.617052.83373467971-53.83260259241616874.2188679127116.223734679712
707300.687656.92867258841-33.84517193619916978.27649934779356.248672588407
717392.937683.1304223138320.39544690328967082.33413078288290.200422313831
727497.317816.1271779252312.65544681294247165.83737526183318.81717792523
737584.717864.6505150814155.42886517781087249.34061974078279.940515081414
747160.796864.25997175526125.2042545657427332.115773679-296.530028244738
757196.196887.3979338062290.0911385765657414.89092761722-308.792066193782
767245.636933.3153636139153.82609390054227504.11854248554-312.314636386085
777347.517041.3883676828360.2854749633027593.34615735387-306.12163231717
787425.757143.957294271981.376052289899927706.16665343812-281.792705728024
797778.517904.0517489318-166.018898454177818.98714952238125.541748931792
807822.337844.79889990724-165.5662756841917965.4273757769522.4688999072423
818181.228304.4050005609-53.83260259241618111.86760203152123.185000560897
828371.478517.06250446234-33.84517193619918259.72266747386145.592504462338
838347.718267.4468201805120.39544690328968407.5777329162-80.2631798194907
848672.118807.2563678033412.65544681294248524.30818538372135.146367803338
858802.798909.1124969709555.42886517781088641.03863785124106.322496970946
869138.469449.24260553694125.2042545657428702.47313989732310.782605536941
879123.299392.5812194800590.0911385765658763.9076419434269.291219480045
889023.219244.8207279457553.82609390054228747.77317815371221.610727945746
898850.418908.8958106726760.2854749633028731.6387143640358.4858106726679
908864.589074.992606748411.376052289899928652.79134096169210.412606748410
919163.749919.55493089482-166.018898454178573.94396755935755.814930894818
928516.668737.89146462115-165.5662756841918460.99481106305221.231464621145
938553.448812.66694802568-53.83260259241618348.04565456674259.226948025675
947555.26946.3414598409-33.84517193619918197.9037120953-608.858540159095
957851.227634.2827834728720.39544690328968047.76176962385-216.937216527135
9674427042.2775420281412.65544681294247829.06701115892-399.722457971861
977992.538319.258882128255.42886517781087610.372252694326.728882128196
988264.049075.98855241598125.2042545657427326.88719301828811.948552415976
997517.397901.2867280808690.0911385765657043.40213334257383.896728080863
1007200.47646.9735839107753.82609390054226700.00032218869446.573583910772
1017193.697970.496014001960.2854749633026356.5985110348776.8060140019
1026193.586365.037083732161.376052289899926020.74686397794171.457083732164
1035104.214689.5436815331-166.018898454175684.89521692107-414.666318466902
1044800.464428.98922579075-165.5662756841915337.49704989344-371.470774209246
1054461.613986.95371972661-53.83260259241614990.0988828658-474.656280273386
1064398.594199.34538734006-33.84517193619914631.67978459614-199.24461265994
1074243.634193.6038667702320.39544690328964273.26068632648-50.0261332297659
1084293.824664.7750517634912.65544681294243910.20950142356370.955051763493
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/03/t12598629279gv7ix2is1qr9fq/1pe9b1259862884.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/03/t12598629279gv7ix2is1qr9fq/1pe9b1259862884.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/03/t12598629279gv7ix2is1qr9fq/2y7sl1259862884.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/03/t12598629279gv7ix2is1qr9fq/2y7sl1259862884.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/03/t12598629279gv7ix2is1qr9fq/3iyvn1259862884.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/03/t12598629279gv7ix2is1qr9fq/3iyvn1259862884.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/03/t12598629279gv7ix2is1qr9fq/4ngy61259862884.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/03/t12598629279gv7ix2is1qr9fq/4ngy61259862884.ps (open in new window)


 
Parameters (Session):
par1 = FALSE ; par2 = 0.2 ; par3 = 1 ; par4 = 0 ; par5 = 12 ; par6 = 2 ; par7 = 0 ; par8 = 0 ; par9 = 0 ;
 
Parameters (R input):
par1 = 12 ; par2 = periodic ; par3 = 0 ; par5 = 1 ; par7 = 1 ; par8 = FALSE ; par9 = 0 ;
 
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