Home » date » 2010 » Aug » 19 »

TIJDREEKS A - STAP 29

*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 20:14:16 +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/t1282248836yagshqz3izcg1y2.htm/, Retrieved Thu, 19 Aug 2010 22:14:00 +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/t1282248836yagshqz3izcg1y2.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:
Mertens Jeroen
 
Dataseries X:
» Textbox « » Textfile « » CSV «
349 348 347 345 365 364 349 339 340 340 341 343 341 343 341 335 355 357 337 325 336 338 337 328 326 327 319 310 320 322 303 292 303 315 311 307 308 312 309 310 309 304 287 275 290 298 294 286 294 292 287 281 280 271 264 259 271 279 279 273 286 286 280 277 269 255 252 245 257 267 261 258 271 262 258 253 236 228 235 226 231 235 227 222 233 221 218 220 204 196 208 190 191 194 179 162 179 176 168 170 153 142 155 136 136 144 135 114 135 132 123 123 103 97 113 108 111 121 111 97
 
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
1349NANA7.4976851851852NA
2348NANA7.21527777777778NA
3347NANA4.01157407407408NA
4345NANA3.41898148148149NA
5365NANA-0.0578703703703726NA
6364NANA-4.18750000000002NA
7349343.44212962963347.166666666667-3.724537037037045.55787037037027
8339333.446759259259346.625-13.17824074074085.5532407407407
9340342.581018518519346.166666666667-3.58564814814815-2.58101851851853
10340350.090277777778345.54.59027777777779-10.0902777777778
11341346.386574074074344.6666666666671.71990740740741-5.38657407407402
12343340.238425925926343.958333333333-3.719907407407412.76157407407408
13341350.664351851852343.1666666666677.4976851851852-9.66435185185185
14343349.298611111111342.0833333333337.21527777777778-6.29861111111109
15341345.344907407407341.3333333333334.01157407407408-4.34490740740739
16335344.502314814815341.0833333333333.41898148148149-9.50231481481478
17355340.775462962963340.833333333333-0.057870370370372614.2245370370371
18357335.854166666667340.041666666667-4.1875000000000221.1458333333333
19337335.067129629630338.791666666667-3.724537037037041.93287037037032
20325324.321759259259337.5-13.17824074074080.678240740740705
21336332.331018518519335.916666666667-3.585648148148153.66898148148147
22338338.548611111111333.9583333333334.59027777777779-0.548611111111029
23337333.178240740741331.4583333333331.719907407407413.82175925925930
24328324.821759259259328.541666666667-3.719907407407413.17824074074076
25326333.164351851852325.6666666666677.4976851851852-7.1643518518519
26327330.090277777778322.8757.21527777777778-3.09027777777777
27319324.136574074074320.1254.01157407407408-5.13657407407408
28310321.210648148148317.7916666666673.41898148148149-11.2106481481481
29320315.692129629630315.75-0.05787037037037264.30787037037038
30322309.604166666667313.791666666667-4.1875000000000212.3958333333333
31303308.442129629630312.166666666667-3.72453703703704-5.44212962962962
32292297.613425925926310.791666666667-13.1782407407408-5.61342592592587
33303306.164351851852309.75-3.58564814814815-3.16435185185185
34315313.923611111111309.3333333333334.590277777777791.07638888888886
35311310.594907407407308.8751.719907407407410.405092592592609
36307303.946759259259307.666666666667-3.719907407407413.05324074074070
37308313.747685185185306.257.4976851851852-5.74768518518516
38312312.090277777778304.8757.21527777777778-0.0902777777777715
39309307.636574074074303.6254.011574074074081.36342592592592
40310305.793981481481302.3753.418981481481494.20601851851853
41309300.900462962963300.958333333333-0.05787037037037268.09953703703707
42304295.1875299.375-4.187500000000028.8125
43287294.192129629630297.916666666667-3.72453703703704-7.19212962962962
44275283.321759259259296.5-13.1782407407408-8.32175925925924
45290291.164351851852294.75-3.58564814814815-1.16435185185179
46298297.215277777778292.6254.590277777777790.784722222222229
47294291.928240740741290.2083333333331.719907407407412.07175925925930
48286283.905092592593287.625-3.719907407407412.09490740740739
49294292.789351851852285.2916666666677.49768518518521.21064814814815
50292290.881944444444283.6666666666677.215277777777781.11805555555554
51287286.219907407407282.2083333333334.011574074074080.78009259259261
52281284.043981481481280.6253.41898148148149-3.04398148148147
53280279.150462962963279.208333333333-0.05787037037037260.849537037037067
54271273.854166666667278.041666666667-4.18750000000002-2.85416666666669
55264273.442129629630277.166666666667-3.72453703703704-9.44212962962962
56259263.405092592593276.583333333333-13.1782407407408-4.40509259259261
57271272.456018518519276.041666666667-3.58564814814815-1.45601851851853
58279280.173611111111275.5833333333334.59027777777779-1.17361111111109
59279276.678240740741274.9583333333331.719907407407412.32175925925924
60273270.113425925926273.833333333333-3.719907407407412.88657407407402
61286280.164351851852272.6666666666677.49768518518525.8356481481481
62286278.798611111111271.5833333333337.215277777777787.20138888888886
63280274.428240740741270.4166666666674.011574074074085.57175925925924
64277272.752314814815269.3333333333333.418981481481494.24768518518516
65269268.025462962963268.083333333333-0.05787037037037260.97453703703701
66255262.520833333333266.708333333333-4.18750000000002-7.52083333333337
67252261.733796296296265.458333333333-3.72453703703704-9.73379629629628
68245250.655092592593263.833333333333-13.1782407407408-5.65509259259255
69257258.331018518518261.916666666667-3.58564814814815-1.33101851851848
70267264.5902777777782604.590277777777792.40972222222229
71261259.344907407407257.6251.719907407407411.65509259259267
72258251.405092592593255.125-3.719907407407416.59490740740742
73271260.789351851852253.2916666666677.497685185185210.2106481481482
74262259.006944444444251.7916666666677.215277777777782.99305555555557
75258253.928240740741249.9166666666674.011574074074084.07175925925927
76253250.918981481481247.53.418981481481492.08101851851850
77236244.692129629630244.75-0.0578703703703726-8.69212962962965
78228237.645833333333241.833333333333-4.18750000000002-9.64583333333331
79235235.025462962963238.75-3.72453703703704-0.0254629629629619
80226222.280092592593235.458333333333-13.17824074074083.71990740740745
81231228.497685185185232.083333333333-3.585648148148152.50231481481484
82235233.631944444444229.0416666666674.590277777777791.36805555555557
83227228.053240740741226.3333333333331.71990740740741-1.05324074074079
84222219.946759259259223.666666666667-3.719907407407412.05324074074073
85233228.706018518519221.2083333333337.49768518518524.29398148148150
86221225.798611111111218.5833333333337.21527777777778-4.79861111111106
87218219.428240740741215.4166666666674.01157407407408-1.42824074074070
88220215.460648148148212.0416666666673.418981481481494.53935185185190
89204208.275462962963208.333333333333-0.0578703703703726-4.27546296296293
90196199.645833333333203.833333333333-4.18750000000002-3.64583333333326
91208195.358796296296199.083333333333-3.7245370370370412.6412037037037
92190181.780092592593194.958333333333-13.17824074074088.21990740740742
93191187.414351851852191-3.585648148148153.58564814814812
94194191.423611111111186.8333333333334.590277777777792.57638888888886
95179184.344907407407182.6251.71990740740741-5.34490740740745
96162174.530092592593178.25-3.71990740740741-12.5300925925926
97179181.289351851852173.7916666666677.4976851851852-2.28935185185185
98176176.548611111111169.3333333333337.21527777777778-0.548611111111086
99168168.803240740741164.7916666666674.01157407407408-0.803240740740762
100170163.835648148148160.4166666666673.418981481481496.16435185185182
101153156.442129629630156.5-0.0578703703703726-3.44212962962962
102142148.479166666667152.666666666667-4.18750000000002-6.47916666666663
103155145.108796296296148.833333333333-3.724537037037049.8912037037037
104136131.988425925926145.166666666667-13.17824074074084.01157407407410
105136137.872685185185141.458333333333-3.58564814814815-1.87268518518516
106144142.215277777778137.6254.590277777777791.7847222222222
107135135.303240740741133.5833333333331.71990740740741-0.303240740740733
108114125.905092592593129.625-3.71990740740741-11.9050925925926
109135133.4976851851851267.49768518518521.50231481481481
110132130.298611111111123.0833333333337.215277777777781.7013888888889
111123124.886574074074120.8754.01157407407408-1.88657407407408
112123122.293981481481118.8753.418981481481490.706018518518533
113103116.858796296296116.916666666667-0.0578703703703726-13.8587962962963
11497111.020833333333115.208333333333-4.18750000000002-14.0208333333333
115113NANA-3.72453703703704NA
116108NANA-13.1782407407408NA
117111NANA-3.58564814814815NA
118121NANA4.59027777777779NA
119111NANA1.71990740740741NA
12097NANA-3.71990740740741NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Aug/19/t1282248836yagshqz3izcg1y2/1p1431282248853.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/19/t1282248836yagshqz3izcg1y2/1p1431282248853.ps (open in new window)


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


http://www.freestatistics.org/blog/date/2010/Aug/19/t1282248836yagshqz3izcg1y2/30smo1282248853.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/19/t1282248836yagshqz3izcg1y2/30smo1282248853.ps (open in new window)


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