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 09:22:50 +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/t12822098998328me9lznnhoy8.htm/, Retrieved Thu, 19 Aug 2010 11:25:05 +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/t12822098998328me9lznnhoy8.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:
DeGroodtOlivierStap29V
 
Dataseries X:
» Textbox « » Textfile « » CSV «
356 355 354 352 372 371 356 346 347 347 348 350 353 351 348 351 370 370 351 335 330 328 332 334 343 334 336 343 365 364 351 326 320 312 315 316 319 311 315 322 336 339 317 295 291 283 285 289 296 283 285 289 306 306 283 258 255 248 244 249 258 252 246 249 267 284 261 235 229 218 218 229 237 231 229 233 245 256 224 194 192 178 170 187 192 182 178 186 204 224 194 173 178 168 152 163 172 170 156 155 178 194 164 135 139 135 109 121 131 135 119 121 151 169 135 105 112 105 82 81
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time7 seconds
R Server'George Udny Yule' @ 72.249.76.132


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1356NANA0.463734567901232NA
2355NANA-3.17515432098767NA
3354NANA-5.08256172839506NA
4352NANA1.23688271604937NA
5372NANA22.8109567901235NA
6371NANA34.6211419753086NA
7356364.72762345679354.37510.3526234567901-8.72762345679007
8346343.829475308642354.083333333333-10.25385802469142.17052469135803
9347343.741512345679353.666666666667-9.925154320987633.25848765432102
10347338.496141975309353.375-14.87885802469148.50385802469134
11348335.574845679012353.25-17.675154320987712.4251543209876
12350344.630401234568353.125-8.49459876543215.36959876543216
13353353.338734567901352.8750.463734567901232-0.338734567901156
14351349.033179012346352.208333333333-3.175154320987671.96682098765427
15348345.959104938272351.041666666667-5.082561728395062.04089506172841
16351350.778549382716349.5416666666671.236882716049370.221450617283949
17370370.894290123457348.08333333333322.8109567901235-0.894290123456813
18370381.371141975309346.7534.6211419753086-11.3711419753087
19351356.019290123457345.66666666666710.3526234567901-5.01929012345681
20335334.287808641975344.541666666667-10.25385802469140.712191358024711
21330333.408179012346343.333333333333-9.92515432098763-3.40817901234567
22328327.621141975309342.5-14.87885802469140.378858024691397
23332324.283179012346341.958333333333-17.67515432098777.71682098765433
24334333.005401234568341.5-8.49459876543210.994598765432045
25343341.713734567901341.250.4637345679012321.28626543209879
26334337.699845679012340.875-3.17515432098767-3.69984567901236
27336335.000771604938340.083333333333-5.082561728395060.999228395061664
28343340.2368827160493391.236882716049372.76311728395063
29365360.435956790123337.62522.81095679012354.56404320987662
30364370.787808641975336.16666666666734.6211419753086-6.78780864197529
31351344.769290123457334.41666666666710.35262345679016.23070987654324
32326322.204475308642332.458333333333-10.25385802469143.79552469135803
33320320.699845679012330.625-9.92515432098763-0.699845679012299
34312313.996141975309328.875-14.8788580246914-1.99614197530866
35315309.116512345679326.791666666667-17.67515432098775.88348765432102
36316316.047067901235324.541666666667-8.4945987654321-0.047067901234584
37319322.547067901235322.0833333333330.463734567901232-3.54706790123458
38311316.199845679012319.375-3.17515432098767-5.19984567901236
39315311.792438271605316.875-5.082561728395063.20756172839504
40322315.695216049383314.4583333333331.236882716049376.30478395061732
41336334.81095679012331222.81095679012351.18904320987662
42339344.246141975309309.62534.6211419753086-5.24614197530866
43317317.894290123457307.54166666666710.3526234567901-0.89429012345687
44295295.162808641975305.416666666667-10.2538580246914-0.162808641975289
45291293.074845679012303-9.92515432098763-2.0748456790123
46283285.496141975309300.375-14.8788580246914-2.49614197530872
47285280.074845679012297.75-17.67515432098774.92515432098764
48289286.630401234568295.125-8.49459876543212.3695987654321
49296292.797067901235292.3333333333330.4637345679012323.20293209876547
50283286.199845679012289.375-3.17515432098767-3.19984567901241
51285281.250771604938286.333333333333-5.082561728395063.74922839506172
52289284.611882716049283.3751.236882716049374.38811728395058
53306303.019290123457280.20833333333322.81095679012352.98070987654324
54306311.454475308642276.83333333333334.6211419753086-5.45447530864203
55283283.935956790123273.58333333333310.3526234567901-0.935956790123441
56258260.454475308642270.708333333333-10.2538580246914-2.45447530864203
57255257.866512345679267.791666666667-9.92515432098763-2.86651234567904
58248249.621141975309264.5-14.8788580246914-1.62114197530866
59244243.533179012346261.208333333333-17.67515432098770.466820987654273
60249250.172067901235258.666666666667-8.4945987654321-1.17206790123453
61258257.297067901235256.8333333333330.4637345679012320.702932098765473
62252251.783179012346254.958333333333-3.175154320987670.216820987654359
63246247.834104938272252.916666666667-5.08256172839506-1.83410493827159
64249251.820216049383250.5833333333331.23688271604937-2.82021604938271
65267271.060956790123248.2522.8109567901235-4.06095679012341
66284280.954475308642246.33333333333334.62114197530863.04552469135805
67261254.97762345679244.62510.35262345679016.0223765432099
68235232.621141975309242.875-10.25385802469142.37885802469137
69229231.366512345679241.291666666667-9.92515432098763-2.36651234567898
70218225.037808641975239.916666666667-14.8788580246914-7.03780864197529
71218220.658179012346238.333333333333-17.6751543209877-2.65817901234567
72229227.755401234568236.25-8.49459876543211.24459876543210
73237234.005401234568233.5416666666670.4637345679012322.9945987654321
74231227.116512345679230.291666666667-3.175154320987673.88348765432102
75229221.959104938272227.041666666667-5.082561728395067.04089506172843
76233225.070216049383223.8333333333331.236882716049377.9297839506173
77245242.97762345679220.16666666666722.81095679012352.02237654320987
78256251.037808641975216.41666666666734.62114197530864.96219135802471
79224223.144290123457212.79166666666710.35262345679010.855709876543216
80194198.621141975309208.875-10.2538580246914-4.62114197530863
81192194.783179012346204.708333333333-9.92515432098763-2.78317901234564
82178185.746141975309200.625-14.8788580246914-7.74614197530863
83170179.283179012346196.958333333333-17.6751543209877-9.28317901234567
84187185.422067901235193.916666666667-8.49459876543211.57793209876547
85192191.797067901235191.3333333333330.4637345679012320.202932098765416
86182186.033179012346189.208333333333-3.17515432098767-4.03317901234567
87178182.667438271605187.75-5.08256172839506-4.66743827160494
88186187.986882716049186.751.23688271604937-1.98688271604934
89204208.394290123457185.58333333333322.8109567901235-4.39429012345678
90224218.454475308642183.83333333333334.62114197530865.54552469135805
91194192.3526234567918210.35262345679011.64737654320987
92173170.412808641975180.666666666667-10.25385802469142.58719135802465
93178169.324845679012179.25-9.925154320987638.67515432098767
94168162.162808641975177.041666666667-14.87885802469145.83719135802471
95152156.991512345679174.666666666667-17.6751543209877-4.99151234567898
96163163.838734567901172.333333333333-8.4945987654321-0.838734567901213
97172170.297067901235169.8333333333330.4637345679012321.70293209876542
98170163.824845679012167-3.175154320987676.17515432098767
99156158.709104938272163.791666666667-5.08256172839506-2.70910493827159
100155162.028549382716160.7916666666671.23688271604937-7.02854938271602
101178180.435956790123157.62522.8109567901235-2.43595679012347
102194188.704475308642154.08333333333334.62114197530865.29552469135805
103164160.97762345679150.62510.35262345679013.0223765432099
104135137.204475308642147.458333333333-10.2538580246914-2.20447530864200
105139134.533179012346144.458333333333-9.925154320987634.46682098765433
106135126.621141975309141.5-14.87885802469148.37885802469137
107109121.283179012346138.958333333333-17.6751543209877-12.2831790123457
108121128.297067901235136.791666666667-8.4945987654321-7.29706790123456
109131135.005401234568134.5416666666670.463734567901232-4.0054012345679
110135128.908179012346132.083333333333-3.175154320987676.09182098765436
111119124.625771604938129.708333333333-5.08256172839506-5.62577160493825
112121128.570216049383127.3333333333331.23688271604937-7.57021604938268
113151147.769290123457124.95833333333322.81095679012353.23070987654323
114169156.787808641975122.16666666666734.621141975308612.2121913580247
115135NANA10.3526234567901NA
116105NANA-10.2538580246914NA
117112NANA-9.92515432098763NA
118105NANA-14.8788580246914NA
11982NANA-17.6751543209877NA
12081NANA-8.4945987654321NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Aug/19/t12822098998328me9lznnhoy8/18d631282209762.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/19/t12822098998328me9lznnhoy8/18d631282209762.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/19/t12822098998328me9lznnhoy8/28d631282209762.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/19/t12822098998328me9lznnhoy8/28d631282209762.ps (open in new window)


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


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