Home » date » 2009 » Jun » 06 »

Mauro De Colfmaker Opgave 9 Oefening 2

*Unverified author*
R Software Module: rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Sat, 06 Jun 2009 12:11:25 -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/Jun/06/t1244311916udqrz80ipusux8v.htm/, Retrieved Sat, 06 Jun 2009 20:11:56 +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/Jun/06/t1244311916udqrz80ipusux8v.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 «
0.22 0.22 0.2 0.21 0.21 0.19 0.19 0.18 0.18 0.19 0.18 0.17 0.17 0.17 0.18 0.2 0.2 0.2 0.22 0.23 0.25 0.25 0.27 0.29 0.3 0.31 0.33 0.31 0.33 0.33 0.35 0.37 0.47 0.45 0.45 0.4 0.34 0.35 0.34 0.35 0.36 0.37 0.36 0.35 0.36 0.33 0.3 0.28 0.28 0.28 0.3 0.32 0.32 0.3 0.3 0.31 0.33 0.34 0.31 0.33 0.35 0.38 0.4 0.32 0.29 0.3 0.3 0.32 0.32 0.32 0.32 0.32 0.33 0.31 0.33 0.35 0.37 0.37 0.38 0.42 0.42 0.49 0.45 0.41 0.4 0.42 0.47 0.49 0.47 0.52 0.56 0.57 0.61 0.52 0.5 0.5
 
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'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
10.22NANA-0.0151240079365079NA
20.22NANA-0.0125049603174603NA
30.2NANA0.00118551587301588NA
40.21NANA-0.00476686507936508NA
50.21NANA-0.0086359126984127NA
60.19NANA-0.00536210317460317NA
70.190.1870188492063490.192916666666667-0.005897817460317470.00298115079365086
80.180.1920188492063490.188750.00326884920634919-0.0120188492063492
90.180.2077331349206350.1858333333333330.0218998015873016-0.0277331349206349
100.190.2089236111111110.1845833333333330.0243402777777778-0.0189236111111111
110.180.1920188492063490.183750.0082688492063492-0.0120188492063492
120.170.1770783730158730.18375-0.00667162698412698-0.00707837301587297
130.170.1702926587301590.185416666666667-0.0151240079365079-0.000292658730158712
140.170.1762450396825400.18875-0.0125049603174603-0.00624503968253964
150.180.1949355158730160.193750.00118551587301588-0.0149355158730159
160.20.1943998015873020.199166666666667-0.004766865079365080.00560019841269846
170.20.1967807539682540.205416666666667-0.00863591269841270.00321924603174609
180.20.2088045634920630.214166666666667-0.00536210317460317-0.00880456349206343
190.220.2186855158730160.224583333333333-0.005897817460317470.00131448412698418
200.230.2391021825396830.2358333333333330.00326884920634919-0.0091021825396825
210.250.2698164682539680.2479166666666670.0218998015873016-0.0198164682539682
220.250.2830902777777780.258750.0243402777777778-0.0330902777777778
230.270.2770188492063490.268750.0082688492063492-0.00701884920634921
240.290.2729117063492060.279583333333333-0.006671626984126980.0170882936507936
250.30.2752926587301590.290416666666667-0.01512400793650790.0247073412698413
260.310.2891617063492060.301666666666667-0.01250496031746030.0208382936507936
270.330.3178521825396830.3166666666666670.001185515873015880.0121478174603175
280.310.3293998015873020.334166666666667-0.00476686507936508-0.0193998015873016
290.330.3413640873015870.35-0.0086359126984127-0.0113640873015873
300.330.356721230158730.362083333333333-0.00536210317460317-0.0267212301587302
310.350.3624355158730160.368333333333333-0.00589781746031747-0.0124355158730159
320.370.3749355158730160.3716666666666670.00326884920634919-0.00493551587301588
330.470.3956498015873020.373750.02189980158730160.0743501984126984
340.450.4001736111111110.3758333333333330.02434027777777780.0498263888888889
350.450.3870188492063490.378750.00826884920634920.0629811507936508
360.40.374995039682540.381666666666667-0.006671626984126980.0250049603174604
370.340.3686259920634920.38375-0.0151240079365079-0.0286259920634920
380.350.3708283730158730.383333333333333-0.0125049603174603-0.0208283730158730
390.340.3791021825396830.3779166666666670.00118551587301588-0.0391021825396825
400.350.3635664682539680.368333333333333-0.00476686507936508-0.0135664682539682
410.360.3484474206349210.357083333333333-0.00863591269841270.0115525793650794
420.370.340471230158730.345833333333333-0.005362103174603170.0295287698412698
430.360.3324355158730160.338333333333333-0.005897817460317470.0275644841269841
440.350.3361855158730160.3329166666666670.003268849206349190.0138144841269842
450.360.3502331349206350.3283333333333330.02189980158730160.00976686507936503
460.330.3497569444444440.3254166666666670.0243402777777778-0.0197569444444444
470.30.3307688492063490.32250.0082688492063492-0.0307688492063491
480.280.311245039682540.317916666666667-0.00667162698412698-0.0312450396825397
490.280.2973759920634920.3125-0.0151240079365079-0.0173759920634921
500.280.2958283730158730.308333333333333-0.0125049603174603-0.0158283730158731
510.30.3066021825396830.3054166666666670.00118551587301588-0.00660218253968264
520.320.2998164682539680.304583333333333-0.004766865079365080.0201835317460317
530.320.2967807539682540.305416666666667-0.00863591269841270.023219246031746
540.30.3025545634920630.307916666666667-0.00536210317460317-0.00255456349206346
550.30.3070188492063490.312916666666667-0.00589781746031747-0.00701884920634921
560.310.3232688492063490.320.00326884920634919-0.0132688492063492
570.330.3502331349206350.3283333333333330.0218998015873016-0.0202331349206349
580.340.3568402777777780.33250.0243402777777778-0.0168402777777777
590.310.3395188492063490.331250.0082688492063492-0.0295188492063492
600.330.3233283730158730.33-0.006671626984126980.00667162698412699
610.350.3148759920634920.33-0.01512400793650790.0351240079365079
620.380.3179117063492060.330416666666667-0.01250496031746030.0620882936507936
630.40.3316021825396830.3304166666666670.001185515873015880.0683978174603175
640.320.3243998015873020.329166666666667-0.00476686507936508-0.00439980158730158
650.290.3201140873015870.32875-0.0086359126984127-0.0301140873015874
660.30.3233878968253970.32875-0.00536210317460317-0.0233878968253968
670.30.3216021825396830.3275-0.00589781746031747-0.0216021825396825
680.320.3270188492063490.323750.00326884920634919-0.00701884920634915
690.320.3398164682539680.3179166666666670.0218998015873016-0.0198164682539683
700.320.3405902777777780.316250.0243402777777778-0.0205902777777778
710.320.3291021825396830.3208333333333330.0082688492063492-0.00910218253968259
720.320.3204117063492060.327083333333333-0.00667162698412698-0.000411706349206342
730.330.3182093253968250.333333333333333-0.01512400793650790.0117906746031746
740.310.3283283730158730.340833333333333-0.0125049603174603-0.0183283730158730
750.330.3503521825396830.3491666666666670.00118551587301588-0.0203521825396826
760.350.3556498015873020.360416666666667-0.00476686507936508-0.00564980158730161
770.370.3642807539682540.372916666666667-0.00863591269841270.00571924603174601
780.370.376721230158730.382083333333333-0.00536210317460317-0.00672123015873016
790.380.3828521825396830.38875-0.00589781746031747-0.0028521825396825
800.420.3995188492063490.396250.003268849206349190.0204811507936508
810.420.4285664682539680.4066666666666670.0218998015873016-0.00856646825396823
820.490.4426736111111110.4183333333333330.02434027777777780.047326388888889
830.450.4366021825396820.4283333333333330.00826884920634920.0133978174603175
840.410.4320783730158730.43875-0.00667162698412698-0.0220783730158730
850.40.4373759920634920.4525-0.0151240079365079-0.0373759920634920
860.420.453745039682540.46625-0.0125049603174603-0.0337450396825397
870.470.4816021825396830.4804166666666670.00118551587301588-0.0116021825396825
880.490.4848164682539680.489583333333333-0.004766865079365080.00518353174603181
890.470.4842807539682540.492916666666667-0.0086359126984127-0.0142807539682540
900.520.4933878968253970.49875-0.005362103174603170.0266121031746032
910.56NANA-0.00589781746031747NA
920.57NANA0.00326884920634919NA
930.61NANA0.0218998015873016NA
940.52NANA0.0243402777777778NA
950.5NANA0.0082688492063492NA
960.5NANA-0.00667162698412698NA
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/06/t1244311916udqrz80ipusux8v/1pg2w1244311881.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/06/t1244311916udqrz80ipusux8v/1pg2w1244311881.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/06/t1244311916udqrz80ipusux8v/2c3df1244311881.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/06/t1244311916udqrz80ipusux8v/2c3df1244311881.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/06/t1244311916udqrz80ipusux8v/3aa0v1244311881.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/06/t1244311916udqrz80ipusux8v/3aa0v1244311881.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/06/t1244311916udqrz80ipusux8v/4oudx1244311881.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/06/t1244311916udqrz80ipusux8v/4oudx1244311881.ps (open in new window)


 
Parameters (Session):
par1 = 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