Home » date » 2010 » Dec » 14 »

paper - classical decomposition

*The author of this computation has been verified*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Tue, 14 Dec 2010 09:36:39 +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/Dec/14/t1292319285kmwxb0ardjcvusj.htm/, Retrieved Tue, 14 Dec 2010 10:34:50 +0100
 
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/Dec/14/t1292319285kmwxb0ardjcvusj.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:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
235.1 280.7 264.6 240.7 201.4 240.8 241.1 223.8 206.1 174.7 203.3 220.5 299.5 347.4 338.3 327.7 351.6 396.6 438.8 395.6 363.5 378.8 357 369 464.8 479.1 431.3 366.5 326.3 355.1 331.6 261.3 249 205.5 235.6 240.9 264.9 253.8 232.3 193.8 177 213.2 207.2 180.6 188.6 175.4 199 179.6 225.8 234 200.2 183.6 178.2 203.2 208.5 191.8 172.8 148 159.4 154.5 213.2 196.4 182.8 176.4 153.6 173.2 171 151.2 161.9 157.2 201.7 236.4 356.1 398.3 403.7 384.6 365.8 368.1 367.9 347 343.3 292.9 311.5 300.9 366.9 356.9 329.7 316.2 269 289.3 266.2 253.6 233.8 228.4 253.6 260.1 306.6 309.2 309.5 271 279.9 317.9 298.4 246.7 227.3 209.1
 
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'George Udny Yule' @ 72.249.76.132


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1235.1NANA41.9798611111111NA
2280.7NANA52.324503968254NA
3264.6NANA30.8965277777778NA
4240.7NANA6.19771825396827NA
5201.4NANA-12.6070436507936NA
6240.8NANA12.172123015873NA
7241.1241.239384920635230.41666666666710.8227182539682-0.139384920634910
8223.8216.872718253968235.879166666667-19.00644841269846.92728174603175
9206.1213.378670634921241.729166666667-28.3504960317460-7.27867063492064
10174.7202.483432539683248.425-45.9415674603175-27.7834325396826
11203.3231.931051587302258.308333333333-26.3772817460318-28.6310515873016
12220.5248.947718253968271.058333333333-22.1106150793651-28.4477182539683
13299.5327.767361111111285.787541.9798611111111-28.2673611111111
14347.4353.507837301587301.18333333333352.324503968254-6.10783730158732
15338.3345.796527777778314.930.8965277777778-7.49652777777777
16327.7336.160218253968329.96256.19771825396827-8.4602182539682
17351.6332.26378968254344.870833333333-12.607043650793619.3362103174603
18396.6369.634623015873357.462512.17212301587326.9653769841270
19438.8381.360218253968370.537510.822718253968257.4397817460318
20395.6363.906051587302382.9125-19.006448412698431.6939484126984
21363.5363.924503968254392.275-28.3504960317460-0.424503968253987
22378.8351.825099206349397.766666666667-45.941567460317526.9749007936508
23357371.951884920635398.329166666667-26.3772817460318-14.9518849206349
24369373.435218253968395.545833333333-22.1106150793651-4.43521825396823
25464.8431.329861111111389.3541.979861111111133.4701388888889
26479.1431.612003968254379.287552.32450396825447.487996031746
27431.3399.817361111111368.92083333333330.896527777777831.4826388888889
28366.5363.126884920635356.9291666666676.197718253968273.37311507936505
29326.3332.042956349206344.65-12.6070436507936-5.74295634920634
30355.1346.426289682540334.25416666666712.1721230158738.67371031746035
31331.6331.410218253968320.587510.82271825396820.189781746031770
32261.3283.864384920635302.870833333333-19.0064484126984-22.5643849206349
33249256.841170634921285.191666666667-28.3504960317460-7.84117063492056
34205.5223.762599206349269.704166666667-45.9415674603175-18.2625992063492
35235.6229.910218253968256.2875-26.37728174603185.68978174603171
36240.9222.043551587302244.154166666667-22.110615079365118.8564484126984
37264.9275.038194444444233.05833333333341.9798611111111-10.1381944444444
38253.8276.837003968254224.512552.324503968254-23.0370039682539
39232.3249.529861111111218.63333333333330.8965277777778-17.2298611111111
40193.8221.060218253968214.86256.19771825396827-27.2602182539682
41177199.476289682540212.083333333333-12.6070436507936-22.4762896825397
42213.2220.176289682540208.00416666666712.172123015873-6.97628968253969
43207.2214.643551587302203.82083333333310.8227182539682-7.44355158730158
44180.6182.360218253968201.366666666667-19.0064484126984-1.76021825396822
45188.6170.853670634921199.204166666667-28.350496031746017.7463293650794
46175.4151.500099206349197.441666666667-45.941567460317523.8999007936508
47199170.689384920635197.066666666667-26.377281746031828.3106150793651
48179.6174.589384920635196.7-22.11061507936515.01061507936507
49225.8238.317361111111196.337541.9798611111111-12.5173611111111
50234249.182837301587196.85833333333352.324503968254-15.1828373015873
51200.2227.563194444444196.66666666666730.8965277777778-27.3631944444445
52183.6201.064384920635194.8666666666676.19771825396827-17.4643849206349
53178.2179.467956349206192.075-12.6070436507936-1.26795634920634
54203.2201.551289682540189.37916666666712.1721230158731.64871031746034
55208.5198.631051587302187.80833333333310.82271825396829.86894841269842
56191.8166.710218253968185.716666666667-19.006448412698425.0897817460317
57172.8155.074503968254183.425-28.350496031746017.7254960317460
58148136.458432539683182.4-45.941567460317511.5415674603175
59159.4154.697718253968181.075-26.37728174603184.70228174603176
60154.5156.689384920635178.8-22.1106150793651-2.18938492063492
61213.2217.967361111111175.987541.9798611111111-4.76736111111111
62196.4225.057837301587172.73333333333352.324503968254-28.6578373015873
63182.8201.484027777778170.587530.8965277777778-18.6840277777778
64176.4176.714384920635170.5166666666676.19771825396827-0.314384920634922
65153.6160.055456349206172.6625-12.6070436507936-6.45545634920637
66173.2190.009623015873177.837512.172123015873-16.809623015873
67171198.026884920635187.20416666666710.8227182539682-27.0268849206349
68151.2182.564384920635201.570833333333-19.0064484126984-31.3643849206349
69161.9190.837003968254219.1875-28.3504960317460-28.9370039682539
70157.2191.125099206349237.066666666667-45.9415674603175-33.9250992063492
71201.7228.206051587302254.583333333333-26.3772817460318-26.5060515873016
72236.4249.435218253968271.545833333333-22.1106150793651-13.0352182539683
73356.1329.850694444444287.87083333333341.979861111111126.2493055555556
74398.3356.557837301587304.23333333333352.32450396825441.7421626984127
75403.7350.846527777778319.9530.896527777777852.8534722222222
76384.6339.360218253968333.16256.1977182539682745.2397817460317
77365.8330.784623015873343.391666666667-12.607043650793635.015376984127
78368.1362.82628968254350.65416666666712.1721230158735.27371031746031
79367.9364.614384920635353.79166666666710.82271825396823.28561507936513
80347333.510218253968352.516666666667-19.006448412698413.4897817460318
81343.3319.357837301587347.708333333333-28.350496031746023.9421626984127
82292.9295.833432539683341.775-45.9415674603175-2.93343253968254
83311.5308.514384920635334.891666666667-26.37728174603182.98561507936506
84300.9305.464384920635327.575-22.1106150793651-4.56438492063489
85366.9362.034027777778320.05416666666741.97986111111114.86597222222218
86356.9364.249503968254311.92552.324503968254-7.349503968254
87329.7334.367361111111303.47083333333330.8965277777778-4.66736111111112
88316.2302.418551587302296.2208333333336.1977182539682713.7814484126984
89269278.51378968254291.120833333333-12.6070436507936-9.5137896825397
90289.3299.180456349206287.00833333333312.172123015873-9.88045634920638
91266.2293.618551587302282.79583333333310.8227182539682-27.4185515873016
92253.6259.289384920635278.295833333333-19.0064484126984-5.68938492063495
93233.8247.116170634921275.466666666667-28.3504960317460-13.3161706349206
94228.4226.800099206349272.741666666667-45.94156746031751.59990079365082
95253.6244.935218253968271.3125-26.37728174603188.66478174603174
96260.1250.847718253968272.958333333333-22.11061507936519.25228174603177
97306.6NA275.491666666667NANA
98309.2NA276.545833333333NANA
99309.5NA275.9875NANA
100271NA274.9125NANA
101279.9NANANANA
102317.9NANANANA
103298.4NANANANA
104246.7NANANANA
105227.3NANANANA
106209.1NANANANA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292319285kmwxb0ardjcvusj/14jkx1292319395.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292319285kmwxb0ardjcvusj/14jkx1292319395.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292319285kmwxb0ardjcvusj/24jkx1292319395.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292319285kmwxb0ardjcvusj/24jkx1292319395.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292319285kmwxb0ardjcvusj/3eski1292319395.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292319285kmwxb0ardjcvusj/3eski1292319395.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292319285kmwxb0ardjcvusj/4eski1292319395.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292319285kmwxb0ardjcvusj/4eski1292319395.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