Home » date » 2009 » Aug » 16 »

*Unverified author*
R Software Module: rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Sun, 16 Aug 2009 10:53:59 -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/Aug/16/t1250441665p7h3uzdxu3q4h9h.htm/, Retrieved Sun, 16 Aug 2009 18:54:30 +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/Aug/16/t1250441665p7h3uzdxu3q4h9h.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 «
72,84 73,96 73,26 73,86 73,04 212,8 157,92 111,55 99,01 89,5 100,95 116,06 131,5 137,43 138,53 137,26 136,81 182,98 149,45 109,34 93,37 84,09 83,83 82,94 82,88 81,41 79,87 79,66 76,07 182,69 165,78 142,5 120,6 105,73 98,72 98,41 96,08 97,3 97,5 97,02 98,75 232,81 240,83 193,4 148,28 138,34 135,34 134,02 133,86 131,67 132,43 130,21 129,98 206,16 195,17 159,16 136,33 125,18 121,21 119,38 119,26 119,75 118,78 116,97 121,69 223,51 228,58 205,22 189,4 180,14 177,59 176,39 171,16 173,11 171,74 175,97 179,64 254,62 240,5 212,01 176,36 153,24 146,69 141,52 142,6 143,19 142,32 142,03 144,92 177,31 194,4 189,19 180,44 175,84 178,54 176,55
 
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
172.84NANA-16.6708035714286NA
273.96NANA-16.4186607142857NA
373.26NANA-17.7497916666667NA
473.86NANA-19.0412797619048NA
573.04NANA-18.7684821428571NA
6212.8NANA62.1553273809524NA
7157.92165.415029761905107.00666666666758.4083630952381-7.49502976190477
8111.55134.669315476190112.09541666666722.5738988095238-23.1193154761905
999.01114.948898809524117.459583333333-2.51068452380952-15.9388988095238
1089.5107.046160714286122.820833333333-15.7746726190476-17.5461607142857
11100.95109.812708333333128.119583333333-18.306875-8.8627083333333
12116.06111.637827380952129.534166666667-17.89633928571434.42217261904764
13131.5111.267946428571127.93875-16.670803571428620.2320535714286
14137.43111.075089285714127.49375-16.418660714285726.3549107142857
15138.53109.416875127.166666666667-17.749791666666729.1131250000000
16137.26107.664970238095126.70625-19.041279761904829.5950297619047
17136.81106.999017857143125.7675-18.768482142857129.8109821428572
18182.98185.829494047619123.67416666666762.1553273809524-2.84949404761906
19149.45178.676696428571120.26833333333358.4083630952381-29.2266964285715
20109.34138.482232142857115.90833333333322.5738988095238-29.1422321428571
2193.37108.619315476190111.13-2.51068452380952-15.2493154761905
2284.0990.5111607142857106.285833333333-15.7746726190476-6.4211607142857
2383.8383.048125101.355-18.3068750.781875
2482.9480.91574404761998.8120833333333-17.89633928571432.02425595238095
2582.8882.809613095238199.4804166666667-16.67080357142860.0703869047618753
2681.4185.1238392857143101.5425-16.4186607142857-3.71383928571429
2779.8786.3089583333333104.05875-17.7497916666667-6.43895833333332
2879.6687.0537202380952106.095-19.0412797619048-7.39372023809521
2976.0788.8486011904762107.617083333333-18.7684821428571-12.7786011904762
30182.69171.037410714286108.88208333333362.155327380952411.6525892857143
31165.78168.485029761905110.07666666666758.4083630952381-2.70502976190477
32142.5133.862648809524111.2887522.57389880952388.63735119047621
33120.6110.174732142857112.685416666667-2.5106845238095210.4252678571428
34105.7398.3686607142857114.143333333333-15.77467261904767.3613392857143
3598.7297.5047916666667115.811666666667-18.3068751.21520833333334
3698.41100.948660714286118.845-17.8963392857143-2.53866071428571
3796.08107.389613095238124.060416666667-16.6708035714286-11.3096130952381
3897.3112.889672619048129.308333333333-16.4186607142857-15.5896726190476
3997.5114.832708333333132.5825-17.7497916666667-17.3327083333333
4097.02116.053303571429135.094583333333-19.0412797619048-19.0333035714286
4198.75119.210684523810137.979166666667-18.7684821428571-20.4606845238095
42232.81203.144077380952140.9887562.155327380952429.6659226190476
43240.83202.455029761905144.04666666666758.408363095238138.3749702380952
44193.4169.626815476190147.05291666666722.573898809523823.7731845238095
45148.28147.429732142857149.940416666667-2.510684523809520.850267857142853
46138.34137.004077380952152.77875-15.77467261904761.33592261904764
47135.34137.156041666667155.462916666667-18.306875-1.81604166666665
48134.02137.757410714286155.65375-17.8963392857143-3.73741071428572
49133.86135.970029761905152.640833333333-16.6708035714286-2.11002976190477
50131.67132.893005952381149.311666666667-16.4186607142857-1.22300595238093
51132.43129.637291666667147.387083333333-17.74979166666672.79270833333337
52130.21127.299553571429146.340833333333-19.04127976190482.91044642857145
53129.98126.435267857143145.20375-18.76848214285713.54473214285716
54206.16206.160327380952144.00562.1553273809524-0.000327380952370504
55195.17201.195029761905142.78666666666758.4083630952381-6.02502976190476
56159.16164.255565476190141.68166666666722.5738988095238-5.09556547619047
57136.33138.105565476190140.61625-2.51068452380952-1.77556547619048
58125.18123.721160714286139.495833333333-15.77467261904761.45883928571428
59121.21120.291875138.59875-18.3068750.918125000000003
60119.38121.079910714286138.97625-17.8963392857143-1.69991071428572
61119.26124.420446428571141.09125-16.6708035714286-5.16044642857139
62119.75127.983839285714144.4025-16.4186607142857-8.23383928571431
63118.78130.783125148.532916666667-17.7497916666667-12.003125
64116.97133.992886904762153.034166666667-19.0412797619048-17.0228869047619
65121.69138.904851190476157.673333333333-18.7684821428571-17.2148511904762
66223.51224.553244047619162.39791666666762.1553273809524-1.04324404761903
67228.58225.344196428571166.93583333333358.40836309523813.23580357142856
68205.22193.895565476190171.32166666666722.573898809523811.3244345238095
69189.4173.240982142857175.751666666667-2.5106845238095216.1590178571429
70180.14164.641994047619180.416666666667-15.774672619047615.4980059523810
71177.59166.982708333333185.289583333333-18.30687510.6072916666667
72176.39171.104077380952189.000416666667-17.89633928571435.2859226190476
73171.16174.122529761905190.793333333333-16.6708035714286-2.96252976190476
74173.11175.154255952381191.572916666667-16.4186607142857-2.04425595238095
75171.74173.562708333333191.3125-17.7497916666667-1.82270833333331
76175.97170.607053571429189.648333333333-19.04127976190485.36294642857143
77179.64168.471517857143187.24-18.768482142857111.1684821428572
78254.62246.654910714286184.49958333333362.15532738095247.96508928571433
79240.5240.265029761905181.85666666666758.40836309523810.234970238095258
80212.01201.993898809524179.4222.573898809523810.0161011904762
81176.36174.436815476190176.9475-2.510684523809521.92318452380957
82153.24158.532827380952174.3075-15.7746726190476-5.29282738095236
83146.69153.139791666667171.446666666667-18.306875-6.44979166666667
84141.52148.882410714286166.77875-17.8963392857143-7.36241071428572
85142.6144.965863095238161.636666666667-16.6708035714286-2.3658630952381
86143.19142.346339285714158.765-16.41866071428570.843660714285704
87142.32140.234375157.984166666667-17.74979166666672.08562499999999
88142.03140.054553571429159.095833333333-19.04127976190481.97544642857142
89144.92142.596101190476161.364583333333-18.76848214285712.32389880952383
90177.31226.306577380952164.1512562.1553273809524-48.9965773809524
91194.4NANA58.4083630952381NA
92189.19NANA22.5738988095238NA
93180.44NANA-2.51068452380952NA
94175.84NANA-15.7746726190476NA
95178.54NANA-18.306875NA
96176.55NANA-17.8963392857143NA
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/16/t1250441665p7h3uzdxu3q4h9h/17now1250441636.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/16/t1250441665p7h3uzdxu3q4h9h/17now1250441636.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/16/t1250441665p7h3uzdxu3q4h9h/2v1vn1250441636.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/16/t1250441665p7h3uzdxu3q4h9h/2v1vn1250441636.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/16/t1250441665p7h3uzdxu3q4h9h/3os951250441636.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/16/t1250441665p7h3uzdxu3q4h9h/3os951250441636.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/16/t1250441665p7h3uzdxu3q4h9h/4extc1250441636.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/16/t1250441665p7h3uzdxu3q4h9h/4extc1250441636.ps (open in new window)


 
Parameters (Session):
par2 = grey ; par3 = FALSE ; par4 = Unknown ;
 
Parameters (R input):
par1 = additive ; par2 = 12 ; par3 = FALSE ; par4 = Unknown ;
 
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