Home » date » 2009 » Jul » 04 »

Opgave 9, oefening 1, stap 1, Sara Vandenberghe

*Unverified author*
R Software Module: rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Sat, 04 Jul 2009 09:17:15 -0600
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Jul/04/t12467206789ff3r4ye92y68wd.htm/, Retrieved Sat, 04 Jul 2009 17:18:03 +0200
 
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/Jul/04/t12467206789ff3r4ye92y68wd.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 «
9,26 9,29 9,28 9,31 9,27 9,27 9,28 9,25 9,32 9,33 9,31 9,3 9,29 9,33 9,35 9,35 9,37 9,37 9,35 9,33 9,34 9,37 9,33 9,31 9,26 9,27 9,29 9,27 9,29 9,31 9,33 9,35 9,34 9,35 9,38 9,43 9,47 9,5 9,55 9,58 9,61 9,57 9,61 9,65 9,62 9,63 9,62 9,63 9,65 9,72 9,75 9,77 9,78 9,82 9,84 9,9 9,94 9,96 10,03 10,03 10,12 10,12 10,05 10,14 10,17 10,2 10,2 10,35 10,43 10,52 10,57 10,57 10,57 10,65 10,57 10,61 10,63 10,71 10,72 10,77 10,79 10,82 10,9 10,83 10,92 10,91 10,88 10,87 11 10,99 11,03 11,04 10,99 10,9 11 10,99 10,92 10,98 11,15 11,19 11,33 11,38 11,4 11,45 11,56 11,61 11,82 11,77 11,85 11,82 11,92 11,86 11,87 11,94 11,86 11,92 11,83 11,91 11,93 11,99 11,96 12,12 11,85 12,01 12,1 12,21 12,31 12,31 12,39 12,35 12,41 12,51
 
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


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
19.26NANA-0.00859027777777797NA
29.29NANA0.0070347222222222NA
39.28NANA-0.0245069444444440NA
49.31NANA-0.0208819444444443NA
59.27NANA0.00361805555555491NA
69.27NANA0.0123263888888894NA
79.289.282284722222229.29041666666667-0.0081319444444447-0.00228472222222287
89.259.301159722222229.293333333333330.00782638888888868-0.0511597222222218
99.329.298243055555559.297916666666670.0003263888888889330.0217569444444461
109.339.304868055555569.30250.002368055555556050.0251319444444444
119.319.336659722222229.308333333333330.0283263888888887-0.026659722222222
129.39.316951388888899.316666666666670.000284722222222126-0.0169513888888879
139.299.315159722222229.32375-0.00859027777777797-0.0251597222222255
149.339.337034722222229.330.0070347222222222-0.00703472222222246
159.359.309659722222229.33416666666667-0.02450694444444400.0403402777777764
169.359.315784722222229.33666666666667-0.02088194444444430.0342152777777773
179.379.342784722222229.339166666666670.003618055555554910.0272152777777777
189.379.352743055555569.340416666666670.01232638888888940.0172569444444441
199.359.331451388888899.33958333333333-0.00813194444444470.0185486111111111
209.339.343659722222229.335833333333330.00782638888888868-0.0136597222222221
219.349.331159722222229.330833333333330.0003263888888889330.00884027777777874
229.379.327368055555559.3250.002368055555556050.0426319444444445
239.339.346659722222229.318333333333330.0283263888888887-0.0166597222222222
249.319.312784722222229.31250.000284722222222126-0.00278472222222348
259.269.300576388888899.30916666666666-0.00859027777777797-0.040576388888887
269.279.316201388888899.309166666666670.0070347222222222-0.0462013888888908
279.299.285493055555569.31-0.02450694444444400.00450694444444366
289.279.288284722222229.30916666666667-0.0208819444444443-0.0182847222222229
299.299.314034722222229.310416666666670.00361805555555491-0.0240347222222219
309.319.329826388888899.31750.0123263888888894-0.0198263888888892
319.339.323118055555569.33125-0.00813194444444470.00688194444444434
329.359.357409722222229.349583333333330.00782638888888868-0.00740972222222247
339.349.370326388888899.370.000326388888888933-0.0303263888888861
349.359.396118055555569.393750.00236805555555605-0.0461180555555565
359.389.448326388888899.420.0283263888888887-0.0683263888888881
369.439.444451388888899.444166666666670.000284722222222126-0.0144513888888902
379.479.458076388888899.46666666666667-0.008590277777777970.0119236111111096
389.59.497868055555569.490833333333330.00703472222222220.00213194444444476
399.559.490493055555569.515-0.02450694444444400.0595069444444434
409.589.517451388888899.53833333333333-0.02088194444444430.0625486111111115
419.619.563618055555559.560.003618055555554910.0463819444444464
429.579.590659722222229.578333333333330.0123263888888894-0.0206597222222218
439.619.586034722222229.59416666666666-0.00813194444444470.0239652777777799
449.659.618659722222229.610833333333330.007826388888888680.0313402777777778
459.629.628659722222229.628333333333340.000326388888888933-0.00865972222222489
469.639.646951388888899.644583333333330.00236805555555605-0.0169513888888861
479.629.687909722222229.659583333333330.0283263888888887-0.0679097222222236
489.639.677368055555569.677083333333330.000284722222222126-0.0473680555555553
499.659.688493055555569.69708333333333-0.00859027777777797-0.0384930555555556
509.729.724118055555569.717083333333330.0070347222222222-0.00411805555555489
519.759.716326388888899.74083333333333-0.02450694444444400.0336736111111104
529.779.747034722222229.76791666666667-0.02088194444444430.0229652777777769
539.789.802368055555559.798750.00361805555555491-0.022368055555555
549.829.844826388888899.83250.0123263888888894-0.0248263888888882
559.849.860618055555569.86875-0.0081319444444447-0.0206180555555555
569.99.912826388888899.9050.00782638888888868-0.0128263888888878
579.949.934493055555569.934166666666670.0003263888888889330.00550694444444311
589.969.964451388888899.962083333333330.00236805555555605-0.00445138888888685
5910.0310.02207638888899.993750.02832638888888870.00792361111111006
6010.0310.026118055555610.02583333333330.0002847222222221260.00388194444444601
6110.1210.048076388888910.0566666666667-0.008590277777777970.0719236111111119
6210.1210.097451388888910.09041666666670.00703472222222220.0225486111111106
6310.0510.105076388888910.1295833333333-0.0245069444444440-0.0550763888888888
6410.1410.152451388888910.1733333333333-0.0208819444444443-0.0124513888888877
6510.1710.222784722222210.21916666666670.00361805555555491-0.0527847222222206
6610.210.276493055555610.26416666666670.0123263888888894-0.0764930555555559
6710.210.297284722222210.3054166666667-0.0081319444444447-0.0972847222222235
6810.3510.354076388888910.346250.00782638888888868-0.00407638888888862
6910.4310.390326388888910.390.0003263888888889330.0396736111111107
7010.5210.433618055555610.431250.002368055555556050.0863819444444456
7110.5710.498326388888910.470.02832638888888870.0716736111111107
7210.5710.510701388888910.51041666666670.0002847222222221260.0592986111111102
7310.5710.544743055555610.5533333333333-0.008590277777777970.0252569444444433
7410.6510.599534722222210.59250.00703472222222220.0504652777777785
7510.5710.600493055555610.625-0.0245069444444440-0.0304930555555565
7610.6110.631618055555610.6525-0.0208819444444443-0.0216180555555567
7710.6310.682368055555610.678750.00361805555555491-0.0523680555555543
7810.7110.715659722222210.70333333333330.0123263888888894-0.00565972222222122
7910.7210.720618055555610.72875-0.0081319444444447-0.000618055555552388
8010.7710.761993055555610.75416666666670.007826388888888680.00800694444444261
8110.7910.778243055555610.77791666666670.0003263888888889330.0117569444444445
8210.8210.804034722222210.80166666666670.002368055555556050.015965277777779
8310.910.856243055555610.82791666666670.02832638888888870.0437569444444463
8410.8310.855284722222210.8550.000284722222222126-0.0252847222222226
8510.9210.870993055555610.8795833333333-0.008590277777777970.049006944444443
8610.9110.910784722222210.903750.0070347222222222-0.000784722222222811
8710.8810.898826388888910.9233333333333-0.0245069444444440-0.0188263888888898
8810.8710.914118055555610.935-0.0208819444444443-0.0441180555555558
891110.946118055555610.94250.003618055555554910.0538819444444449
9010.9910.965659722222210.95333333333330.01232638888888940.0243402777777799
9111.0310.951868055555610.96-0.00813194444444470.0781319444444453
9211.0410.970743055555610.96291666666670.007826388888888680.0692569444444437
9310.9910.977409722222210.97708333333330.0003263888888889330.0125902777777789
9410.911.004034722222211.00166666666670.00236805555555605-0.104034722222222
951111.057076388888911.028750.0283263888888887-0.0570763888888894
9610.9911.059034722222211.058750.000284722222222126-0.0690347222222218
9710.9211.081826388888911.0904166666667-0.00859027777777797-0.161826388888889
9810.9811.129951388888911.12291666666670.0070347222222222-0.149951388888891
9911.1511.139243055555611.16375-0.02450694444444400.0107569444444451
10011.1911.196201388888911.2170833333333-0.0208819444444443-0.00620138888888988
10111.3311.284451388888911.28083333333330.003618055555554910.0455486111111121
10211.3811.359826388888911.34750.01232638888888940.0201736111111117
10311.411.410618055555611.41875-0.0081319444444447-0.0106180555555557
10411.4511.500326388888911.49250.00782638888888868-0.0503263888888892
10511.5611.559909722222211.55958333333330.0003263888888889339.02777777778141e-05
10611.6111.621951388888911.61958333333330.00236805555555605-0.0119513888888907
10711.8211.698326388888911.670.02832638888888870.121673611111110
10811.7711.716118055555611.71583333333330.0002847222222221260.0538819444444467
10911.8511.749743055555611.7583333333333-0.008590277777777970.100256944444446
11011.8211.804118055555611.79708333333330.00703472222222220.0158819444444465
11111.9211.803409722222211.8279166666667-0.02450694444444400.116590277777776
11211.8611.830784722222211.8516666666667-0.02088194444444430.0292152777777765
11311.8711.872368055555611.868750.00361805555555491-0.00236805555555542
11411.9411.894826388888911.88250.01232638888888940.0451736111111103
11511.8611.888118055555611.89625-0.0081319444444447-0.0281180555555558
11611.9211.921159722222211.91333333333330.00782638888888868-0.00115972222222105
11711.8311.923243055555611.92291666666670.000326388888888933-0.0932430555555523
11811.9111.928618055555611.926250.00236805555555605-0.0186180555555531
11911.9311.970409722222211.94208333333330.0283263888888887-0.0404097222222219
12011.9911.963201388888911.96291666666670.0002847222222221260.0267986111111096
12111.9611.984326388888911.9929166666667-0.00859027777777797-0.0243263888888894
12212.1212.034951388888912.02791666666670.00703472222222220.0850486111111106
12311.8512.042993055555612.0675-0.0245069444444440-0.192993055555556
12412.0112.088284722222212.1091666666667-0.0208819444444443-0.0782847222222234
12512.112.151118055555612.14750.00361805555555491-0.0511180555555555
12612.2112.201493055555612.18916666666670.01232638888888940.00850694444444677
12712.31NANA-0.0081319444444447NA
12812.31NANA0.00782638888888868NA
12912.39NANA0.000326388888888933NA
13012.35NANA0.00236805555555605NA
13112.41NANA0.0283263888888887NA
13212.51NANA0.000284722222222126NA
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jul/04/t12467206789ff3r4ye92y68wd/1guan1246720632.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jul/04/t12467206789ff3r4ye92y68wd/1guan1246720632.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jul/04/t12467206789ff3r4ye92y68wd/2l1wr1246720632.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jul/04/t12467206789ff3r4ye92y68wd/2l1wr1246720632.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jul/04/t12467206789ff3r4ye92y68wd/33s061246720632.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jul/04/t12467206789ff3r4ye92y68wd/33s061246720632.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jul/04/t12467206789ff3r4ye92y68wd/4ss2x1246720632.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jul/04/t12467206789ff3r4ye92y68wd/4ss2x1246720632.ps (open in new window)


 
Parameters (Session):
par1 = additive ; par2 = 12 ;
 
Parameters (R input):
par1 = additive ; par2 = 12 ;
 
R code (references can be found in the software module):
par2 <- as.numeric(par2)
x <- ts(x,freq=par2)
m <- decompose(x,type=par1)
m$figure
bitmap(file='test1.png')
plot(m)
dev.off()
mylagmax <- length(x)/2
bitmap(file='test2.png')
op <- par(mfrow = c(2,2))
acf(as.numeric(x),lag.max = mylagmax,main='Observed')
acf(as.numeric(m$trend),na.action=na.pass,lag.max = mylagmax,main='Trend')
acf(as.numeric(m$seasonal),na.action=na.pass,lag.max = mylagmax,main='Seasonal')
acf(as.numeric(m$random),na.action=na.pass,lag.max = mylagmax,main='Random')
par(op)
dev.off()
bitmap(file='test3.png')
op <- par(mfrow = c(2,2))
spectrum(as.numeric(x),main='Observed')
spectrum(as.numeric(m$trend[!is.na(m$trend)]),main='Trend')
spectrum(as.numeric(m$seasonal[!is.na(m$seasonal)]),main='Seasonal')
spectrum(as.numeric(m$random[!is.na(m$random)]),main='Random')
par(op)
dev.off()
bitmap(file='test4.png')
op <- par(mfrow = c(2,2))
cpgram(as.numeric(x),main='Observed')
cpgram(as.numeric(m$trend[!is.na(m$trend)]),main='Trend')
cpgram(as.numeric(m$seasonal[!is.na(m$seasonal)]),main='Seasonal')
cpgram(as.numeric(m$random[!is.na(m$random)]),main='Random')
par(op)
dev.off()
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Classical Decomposition by Moving Averages',6,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'t',header=TRUE)
a<-table.element(a,'Observations',header=TRUE)
a<-table.element(a,'Fit',header=TRUE)
a<-table.element(a,'Trend',header=TRUE)
a<-table.element(a,'Seasonal',header=TRUE)
a<-table.element(a,'Random',header=TRUE)
a<-table.row.end(a)
for (i in 1:length(m$trend)) {
a<-table.row.start(a)
a<-table.element(a,i,header=TRUE)
a<-table.element(a,x[i])
if (par1 == 'additive') a<-table.element(a,m$trend[i]+m$seasonal[i]) else a<-table.element(a,m$trend[i]*m$seasonal[i])
a<-table.element(a,m$trend[i])
a<-table.element(a,m$seasonal[i])
a<-table.element(a,m$random[i])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable.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