Home » date » 2010 » Aug » 19 »

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Thu, 19 Aug 2010 07:53:03 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Aug/19/t1282205288a74zrx4hq3ckvrt.htm/, Retrieved Thu, 19 Aug 2010 10:08:10 +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/2010/Aug/19/t1282205288a74zrx4hq3ckvrt.htm/},
    year = {2010},
}
@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 = {2010},
    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:
DeGroodtOlivierStap29
 
Dataseries X:
» Textbox « » Textfile « » CSV «
112 118 132 129 121 135 148 148 136 119 104 118 115 126 141 135 125 149 170 170 158 133 114 140 145 150 178 163 172 178 199 199 184 162 146 166 171 180 193 181 183 218 230 242 209 191 172 194 196 196 236 235 229 243 264 272 237 211 180 201 204 188 235 227 234 264 302 293 259 229 203 229 242 233 267 269 270 315 364 347 312 274 237 278 284 277 317 313 318 374 413 405 355 306 271 306 315 301 356 348 355 422 465 467 404 347 305 336 340 318 362 348 363 435 491 505 404 359 310 337 360 342 406 396 420 472 548 559 463 407 362 405 417 391 419 461 472 535 622 606 508 461 390 432
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1112NANA-24.7487373737374NA
2118NANA-36.1881313131313NA
3132NANA-2.24116161616162NA
4129NANA-8.03661616161616NA
5121NANA-4.50631313131313NA
6135NANA35.4027777777778NA
7148190.622474747475126.79166666666763.8308080808081-42.6224747474747
8148190.073232323232127.2562.8232323232323-42.0732323232323
9136144.478535353535127.95833333333316.520202020202-8.47853535353535
10119107.940656565657128.583333333333-20.642676767676811.0593434343434
1110475.4065656565656129-53.593434343434328.5934343434344
12118101.13005050505129.75-28.619949494949516.8699494949495
13115106.501262626263131.25-24.74873737373748.49873737373738
1412696.895202020202133.083333333333-36.188131313131329.104797979798
15141132.675505050505134.916666666667-2.241161616161628.32449494949495
16135128.38005050505136.416666666667-8.036616161616166.61994949494951
17125132.910353535354137.416666666667-4.50631313131313-7.91035353535355
18149174.152777777778138.7535.4027777777778-25.1527777777778
19170204.747474747475140.91666666666763.8308080808081-34.7474747474747
20170205.989898989899143.16666666666762.8232323232323-35.989898989899
21158162.228535353535145.70833333333316.520202020202-4.22853535353536
22133127.77398989899148.416666666667-20.64267676767685.2260101010101
2311497.9482323232323151.541666666667-53.593434343434316.0517676767677
24140126.088383838384154.708333333333-28.619949494949513.9116161616162
25145132.376262626263157.125-24.748737373737412.6237373737374
26150123.353535353535159.541666666667-36.188131313131326.6464646464647
27178159.592171717172161.833333333333-2.2411616161616218.4078282828283
28163156.088383838384164.125-8.036616161616166.9116161616162
29172162.160353535353166.666666666667-4.506313131313139.8396464646465
30178204.486111111111169.08333333333335.4027777777778-26.4861111111111
31199235.080808080808171.2563.8308080808081-36.0808080808081
32199236.406565656566173.58333333333362.8232323232323-37.4065656565657
33184191.978535353535175.45833333333316.520202020202-7.97853535353534
34162156.190656565657176.833333333333-20.64267676767685.80934343434342
35146124.448232323232178.041666666667-53.593434343434321.5517676767677
36166151.546717171717180.166666666667-28.619949494949514.4532828282828
37171158.376262626263183.125-24.748737373737412.6237373737374
38180150.020202020202186.208333333333-36.188131313131329.979797979798
39193186.800505050505189.041666666667-2.241161616161626.19949494949498
40181183.25505050505191.291666666667-8.03661616161616-2.25505050505046
41183189.07702020202193.583333333333-4.50631313131313-6.07702020202024
42218231.236111111111195.83333333333335.4027777777778-13.2361111111111
43230261.872474747475198.04166666666763.8308080808081-31.8724747474747
44242262.573232323232199.7562.8232323232323-20.5732323232323
45209218.728535353535202.20833333333316.520202020202-9.72853535353534
46191185.607323232323206.25-20.64267676767685.39267676767682
47172156.823232323232210.416666666667-53.593434343434315.1767676767677
48194184.75505050505213.375-28.61994949494959.24494949494954
49196191.084595959596215.833333333333-24.74873737373744.9154040404041
50196182.311868686869218.5-36.188131313131313.6881313131313
51236218.675505050505220.916666666667-2.2411616161616217.3244949494949
52235214.880050505051222.916666666667-8.0366161616161620.1199494949495
53229219.57702020202224.083333333333-4.506313131313139.42297979797979
54243260.111111111111224.70833333333335.4027777777778-17.1111111111111
55264289.164141414141225.33333333333363.8308080808081-25.1641414141414
56272288.156565656566225.33333333333362.8232323232323-16.1565656565656
57237241.478535353535224.95833333333316.520202020202-4.47853535353536
58211203.940656565657224.583333333333-20.64267676767687.05934343434345
59180170.864898989899224.458333333333-53.59343434343439.13510101010104
60201196.921717171717225.541666666667-28.61994949494954.07828282828282
61204203.251262626263228-24.74873737373740.748737373737384
62188194.270202020202230.458333333333-36.1881313131313-6.27020202020202
63235230.008838383838232.25-2.241161616161624.99116161616161
64227225.88005050505233.916666666667-8.036616161616161.11994949494951
65234231.118686868687235.625-4.506313131313132.88131313131316
66264273.152777777778237.7535.4027777777778-9.15277777777774
67302304.330808080808240.563.8308080808081-2.33080808080805
68293306.781565656566243.95833333333362.8232323232323-13.7815656565656
69259263.686868686869247.16666666666716.520202020202-4.68686868686862
70229229.607323232323250.25-20.6426767676768-0.607323232323239
71203199.906565656566253.5-53.59343434343433.09343434343435
72229228.50505050505257.125-28.61994949494950.494949494949537
73242237.084595959596261.833333333333-24.74873737373744.9154040404041
74233230.478535353535266.666666666667-36.18813131313132.52146464646466
75267268.883838383838271.125-2.24116161616162-1.88383838383839
76269267.171717171717275.208333333333-8.036616161616161.82828282828285
77270273.993686868687278.5-4.50631313131313-3.99368686868684
78315317.361111111111281.95833333333335.4027777777778-2.36111111111109
79364349.580808080808285.7563.830808080808114.4191919191919
80347352.156565656566289.33333333333362.8232323232323-5.15656565656565
81312309.770202020202293.2516.5202020202022.22979797979798
82274276.52398989899297.166666666667-20.6426767676768-2.52398989898984
83237247.406565656566301-53.5934343434343-10.4065656565656
84278276.838383838384305.458333333333-28.61994949494951.16161616161622
85284285.209595959596309.958333333333-24.7487373737374-1.20959595959596
86277278.228535353535314.416666666667-36.1881313131313-1.22853535353534
87317316.383838383838318.625-2.241161616161620.616161616161605
88313313.713383838384321.75-8.03661616161616-0.71338383838389
89318319.993686868687324.5-4.50631313131313-1.99368686868689
90374362.486111111111327.08333333333335.402777777777811.5138888888889
91413393.372474747475329.54166666666763.830808080808119.6275252525253
92405394.656565656566331.83333333333362.823232323232310.3434343434344
93355350.978535353535334.45833333333316.5202020202024.02146464646466
94306316.89898989899337.541666666667-20.6426767676768-10.89898989899
95271286.948232323232340.541666666667-53.5934343434343-15.9482323232324
96306315.463383838384344.083333333333-28.6199494949495-9.46338383838378
97315323.501262626263348.25-24.7487373737374-8.50126262626259
98301316.811868686869353-36.1881313131313-15.8118686868686
99356355.383838383838357.625-2.241161616161620.616161616161605
100348353.338383838384361.375-8.03661616161616-5.33838383838378
101355359.993686868687364.5-4.50631313131313-4.99368686868689
102422402.569444444444367.16666666666735.402777777777819.4305555555556
103465433.289141414141369.45833333333363.830808080808131.7108585858586
104467434.031565656566371.20833333333362.823232323232332.9684343434344
105404388.686868686869372.16666666666716.52020202020215.3131313131314
106347351.77398989899372.416666666667-20.6426767676768-4.77398989898984
107305319.156565656566372.75-53.5934343434343-14.1565656565656
108336345.00505050505373.625-28.6199494949495-9.00505050505046
109340350.501262626263375.25-24.7487373737374-10.5012626262626
110318341.728535353535377.916666666667-36.1881313131313-23.7285353535354
111362377.258838383838379.5-2.24116161616162-15.2588383838384
112348371.963383838384380-8.03661616161616-23.9633838383838
113363376.20202020202380.708333333333-4.50631313131313-13.2020202020202
114435416.361111111111380.95833333333335.402777777777818.638888888889
115491445.664141414141381.83333333333363.830808080808145.3358585858585
116505446.489898989899383.66666666666762.823232323232358.510101010101
117404403.020202020202386.516.5202020202020.979797979798036
118359369.690656565657390.333333333333-20.6426767676768-10.6906565656565
119310341.114898989899394.708333333333-53.5934343434343-31.114898989899
120337370.005050505051398.625-28.6199494949495-33.0050505050505
121360377.792929292929402.541666666667-24.7487373737374-17.7929292929293
122342370.978535353535407.166666666667-36.1881313131313-28.9785353535354
123406409.633838383838411.875-2.24116161616162-3.63383838383834
124396408.296717171717416.333333333333-8.03661616161616-12.2967171717171
125420415.993686868687420.5-4.506313131313134.00631313131316
126472460.902777777778425.535.402777777777811.0972222222222
127548494.539141414141430.70833333333363.830808080808153.4608585858587
128559497.948232323232435.12562.823232323232361.0517676767677
129463454.228535353535437.70833333333316.5202020202028.77146464646466
130407420.315656565656440.958333333333-20.6426767676768-13.3156565656565
131362392.239898989899445.833333333333-53.5934343434343-30.2398989898989
132405422.00505050505450.625-28.6199494949495-17.0050505050505
133417431.584595959596456.333333333333-24.7487373737374-14.5845959595959
134391425.186868686869461.375-36.1881313131313-34.1868686868687
135419462.967171717172465.208333333333-2.24116161616162-43.9671717171717
136461461.296717171717469.333333333333-8.03661616161616-0.296717171717148
137472468.243686868687472.75-4.506313131313133.75631313131316
138535510.444444444444475.04166666666735.402777777777824.5555555555556
139622NANA63.8308080808081NA
140606NANA62.8232323232323NA
141508NANA16.520202020202NA
142461NANA-20.6426767676768NA
143390NANA-53.5934343434343NA
144432NANA-28.6199494949495NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Aug/19/t1282205288a74zrx4hq3ckvrt/1ywed1282204379.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/19/t1282205288a74zrx4hq3ckvrt/1ywed1282204379.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/19/t1282205288a74zrx4hq3ckvrt/2r5dg1282204379.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/19/t1282205288a74zrx4hq3ckvrt/2r5dg1282204379.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/19/t1282205288a74zrx4hq3ckvrt/3r5dg1282204379.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/19/t1282205288a74zrx4hq3ckvrt/3r5dg1282204379.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/19/t1282205288a74zrx4hq3ckvrt/41wc11282204379.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/19/t1282205288a74zrx4hq3ckvrt/41wc11282204379.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