Home » date » 2011 » May » 16 »

opgave9oef2

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Mon, 16 May 2011 19:19:42 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2011/May/16/t1305574233si6kqr0qbwrvigm.htm/, Retrieved Mon, 16 May 2011 21:30:38 +0200
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
KDGP2W92
 
Dataseries X:
» Textbox « » Textfile « » CSV «
131.676 135.050 129.070 137.792 139.762 142.917 144.198 142.648 152.170 136.022 138.142 138.135 135.027 132.911 133.976 137.012 119.610 118.106 120.383 133.185 131.416 134.248 134.397 127.728 131.837 125.955 134.187 143.291 145.074 149.812 144.668 147.253 145.568 155.564 155.872 156.323 158.010 155.598 154.785 157.294 162.938 157.283 166.074 169.282 172.552 174.055 175.409 173.696 171.283 173.322 170.717 174.229 175.339 173.511 175.839 173.816 173.990 174.777 174.819 176.726 176.199 180.952 176.663 182.346 180.605 182.497 187.856 190.020 190.108 193.288 193.230 199.068 195.076 191.563 191.067 186.665 185.508 184.371 183.046 175.714 175.768 171.029 170.465 170.102 156.389 124.291 99.360 86.675 85.056 128.236 164.257 162.401 152.779 156.005 153.387 153.190 148.840 144.211 145.953 145.542 150.271 147.489 143.824 134.754 131.736 126.304 125.511 125.495 130.133 126.257 110.323 98.417 105.749 120.665 12 etc...
 
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'Herman Ole Andreas Wold' @ www.yougetit.org


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1131.676NANA0.85241452991452NA
2135.05NANA-2.70467521367521NA
3129.07NANA-4.79978739316239NA
4137.792NANA-5.2164123931624NA
5139.762NANA-5.10929700854701NA
6142.917NANA-1.01935149572649NA
7144.198141.660561965812139.1047916666672.55577029914532.53743803418803
8142.648141.926501068376139.1552916666672.77120940170940.721498931623927
9152.17142.292763888889139.2705833333333.022180555555559.8772361111111
10136.022143.247696581197139.44253.80519658119658-7.22569658119659
11138.142141.754456196581138.5703333333333.18412286324787-3.61245619658118
12138.135139.355504273504136.6968752.65862927350428-1.22050427350428
13135.027135.523206196581134.6707916666670.85241452991452-0.496206196581198
14132.911130.579533119658133.284208333333-2.704675213675212.33146688034188
15133.976127.225379273504132.025166666667-4.799787393162396.75062072649573
16137.012125.870087606838131.0865-5.216412393162411.1419123931624
17119.61125.74724465812130.856541666667-5.10929700854701-6.13724465811964
18118.106129.247523504274130.266875-1.01935149572649-11.1415235042735
19120.383132.256103632479129.7003333333332.5557702991453-11.8731036324786
20133.185132.048792735043129.2775833333332.77120940170941.13620726495731
21131.416132.018722222222128.9965416666673.02218055555555-0.602722222222212
22134.248133.07215491453129.2669583333333.805196581196581.17584508547009
23134.397133.773706196581130.5895833333333.184122863247870.623293803418818
24127.728135.630295940171132.9716666666672.65862927350428-7.90229594017094
25131.837136.157039529915135.3046250.85241452991452-4.32003952991454
26125.955134.197991452991136.902666666667-2.70467521367521-8.24299145299148
27134.187133.278712606838138.0785-4.799787393162390.908287393162396
28143.291134.339920940171139.556333333333-5.21641239316248.95107905982906
29145.074136.22999465812141.339291666667-5.109297008547018.84400534188035
30149.812142.40619017094143.425541666667-1.019351495726497.40580982905982
31144.668148.263311965812145.7075416666672.5557702991453-3.59531196581199
32147.253150.804417735043148.0332083333332.7712094017094-3.55141773504278
33145.568153.148763888889150.1265833333333.02218055555555-7.5807638888889
34155.564155.373488247863151.5682916666673.805196581196580.190511752136757
35155.872156.080206196581152.8960833333333.18412286324787-0.208206196581187
36156.323156.610337606838153.9517083333332.65862927350428-0.28733760683761
37158.01156.007331196581155.1549166666670.852414529914522.0026688034188
38155.598154.260033119658156.964708333333-2.704675213675211.33796688034192
39154.785154.207129273504159.006916666667-4.799787393162390.577870726495718
40157.294155.685295940171160.901708333333-5.21641239316241.60870405982908
41162.938157.376911324786162.486208333333-5.109297008547015.56108867521368
42157.283163.004773504273164.024125-1.01935149572649-5.7217735042735
43166.074167.856811965812165.3010416666672.5557702991453-1.78281196581199
44169.282169.363792735043166.5925833333332.7712094017094-0.0817927350427397
45172.552171.017097222222167.9949166666673.022180555555551.53490277777775
46174.055173.169571581197169.3643753.805196581196580.885428418803372
47175.409173.770831196581170.5867083333333.184122863247871.63816880341881
48173.696174.438212606838171.7795833333332.65862927350428-0.742212606837597
49171.283173.715039529915172.8626250.85241452991452-2.43203952991453
50173.322170.753741452991173.458416666667-2.704675213675212.56825854700855
51170.717168.907462606838173.70725-4.799787393162391.8095373931624
52174.229168.580837606838173.79725-5.21641239316245.64816239316238
53175.339168.693452991453173.80275-5.109297008547016.645547008547
54173.511172.88506517094173.904416666667-1.019351495726490.625934829059815
55175.839176.791270299145174.23552.5557702991453-0.952270299145283
56173.816177.529459401709174.758252.7712094017094-3.71345940170937
57173.99178.346097222222175.3239166666673.02218055555555-4.35609722222225
58174.777179.715071581197175.9098753.80519658119658-4.9380715811966
59174.819179.651622863248176.46753.18412286324787-4.83262286324785
60176.726179.719962606838177.0613333333332.65862927350428-2.99396260683761
61176.199178.788872863248177.9364583333330.85241452991452-2.58987286324785
62180.952176.407658119658179.112333333333-2.704675213675214.54434188034185
63176.663175.659295940171180.459083333333-4.799787393162391.00370405982903
64182.346176.685545940171181.901958333333-5.21641239316245.66045405982905
65180.605178.331077991453183.440375-5.109297008547012.273922008547
66182.497184.11906517094185.138416666667-1.01935149572649-1.62206517094017
67187.856189.411645299145186.8558752.5557702991453-1.55564529914531
68190.02190.855751068376188.0845416666672.7712094017094-0.835751068376084
69190.108192.149013888889189.1268333333333.02218055555555-2.0410138888889
70193.288193.71215491453189.9069583333333.80519658119658-0.424154914529879
71193.23193.475331196581190.2912083333333.18412286324787-0.245331196581219
72199.068193.232212606838190.5735833333332.658629273504285.8357873931624
73195.076191.303664529915190.451250.852414529914523.77233547008547
74191.563186.950074786325189.65475-2.704675213675214.61292521367523
75191.067183.661379273504188.461166666667-4.799787393162397.40562072649573
76186.665181.719795940171186.936208333333-5.21641239316244.94520405982908
77185.508179.950911324786185.060208333333-5.109297008547015.55708867521366
78184.371181.885398504274182.90475-1.019351495726492.48560149572648
79183.046182.641645299145180.0858752.55577029914530.404354700854697
80175.714178.442126068376175.6709166666672.7712094017094-2.72812606837604
81175.768172.068972222222169.0467916666673.022180555555553.69902777777776
82171.029164.864613247863161.0594166666673.805196581196586.16438675213675
83170.465155.891789529915152.7076666666673.1841228632478714.5732104700855
84170.102148.841837606838146.1832083333332.6586292735042821.2601623931624
85156.389143.913789529915143.0613750.8524145299145212.4752104700855
86124.291139.019116452991141.723791666667-2.70467521367521-14.7281164529914
8799.36135.411420940171140.211208333333-4.79978739316239-36.0514209401709
8886.675133.410920940171138.627333333333-5.2164123931624-46.7359209401709
8985.056132.180452991453137.28975-5.10929700854701-47.124452991453
90128.236134.854148504274135.8735-1.01935149572649-6.61814850427353
91164.257137.410061965812134.8542916666672.555770299145326.846938034188
92162.401138.140959401709135.369752.771209401709424.2600405982906
93152.779141.163305555556138.1411253.0221805555555511.6156944444444
94156.005146.340488247863142.5352916666673.805196581196589.66451175213675
95153.387150.889497863248147.7053753.184122863247872.49750213675213
96153.19153.883504273504151.2248752.65862927350428-0.693504273504288
97148.84152.028122863248151.1757083333330.85241452991452-3.18812286324783
98144.211146.467699786325149.172375-2.70467521367521-2.25669978632476
99145.953142.343837606838147.143625-4.799787393162393.60916239316239
100145.542139.812879273504145.029291666667-5.21641239316245.72912072649572
101150.271137.520952991453142.63025-5.1092970085470112.750047008547
102147.489139.29544017094140.314791666667-1.019351495726498.19355982905984
103143.824140.937145299145138.3813752.55577029914532.88685470085471
104134.754139.625042735043136.8538333333332.7712094017094-4.87104273504272
105131.736137.643347222222134.6211666666673.02218055555555-5.90734722222223
106126.304134.978238247863131.1730416666673.80519658119658-8.67423824786323
107125.511130.538539529915127.3544166666673.18412286324787-5.02753952991453
108125.495127.040295940171124.3816666666672.65862927350428-1.54529594017093
109130.133123.293539529915122.4411250.852414529914526.8394604700855
110126.257118.600699786325121.305375-2.704675213675217.65630021367522
111110.323116.817504273504121.617291666667-4.79978739316239-6.49450427350428
11298.417117.803795940171123.020208333333-5.2164123931624-19.3867959401709
113105.749119.634827991453124.744125-5.10929700854701-13.885827991453
114120.665125.469523504274126.488875-1.01935149572649-4.8045235042735
115124.075130.378478632479127.8227083333332.5557702991453-6.30347863247864
116127.245131.806584401709129.0353752.7712094017094-4.56158440170941
117146.731134.227805555556131.2056253.0221805555555512.5031944444444
118144.979138.50765491453134.7024583333333.805196581196586.47134508547009
119148.21141.656747863248138.4726253.184122863247876.55325213675215
120144.67144.069254273504141.4106252.658629273504280.600745726495717
121142.97144.522997863248143.6705833333330.85241452991452-1.55299786324784
122142.524143.101283119658145.805958333333-2.70467521367521-0.577283119658119
123146.142142.427254273504147.227041666667-4.799787393162393.71474572649572
124146.522143.037545940171148.253958333333-5.21641239316243.48445405982903
125148.128144.102702991453149.212-5.109297008547014.02529700854697
126148.798149.06356517094150.082916666667-1.01935149572649-0.265565170940164
127150.181153.678686965812151.1229166666672.5557702991453-3.49768696581199
128152.388155.020792735043152.2495833333332.7712094017094-2.63279273504273
129155.694156.517638888889153.4954583333333.02218055555555-0.823638888888894
130160.662158.24077991453154.4355833333333.805196581196582.42122008547011
131155.52158.071456196581154.8873333333333.18412286324787-2.55145619658117
132158.262157.529670940171154.8710416666672.658629273504280.732329059829027
133154.338155.230206196581154.3777916666670.85241452991452-0.892206196581213
134158.196150.819241452991153.523916666667-2.704675213675217.37675854700854
135160.371147.635420940171152.435208333333-4.7997873931623912.7355790598291
136154.856145.713254273504150.929666666667-5.21641239316249.14274572649569
137150.636144.043661324786149.152958333333-5.109297008547016.59233867521368
138145.899146.053606837607147.072958333333-1.01935149572649-0.154606837606849
139141.242147.127895299145144.5721252.5557702991453-5.88589529914529
140140.834144.422251068376141.6510416666672.7712094017094-3.58825106837605
141141.119141.388972222222138.3667916666673.02218055555555-0.269972222222236
142139.104139.12065491453135.3154583333333.80519658119658-0.0166549145299086
143134.437135.916831196581132.7327083333333.18412286324787-1.47983119658119
144129.425133.270754273504130.6121252.65862927350428-3.84575427350426
145123.155129.852497863248129.0000833333330.85241452991452-6.69749786324785
146119.273124.943116452991127.647791666667-2.70467521367521-5.67011645299145
147120.472121.317004273504126.116791666667-4.79978739316239-0.845004273504287
148121.523119.131795940171124.348208333333-5.21641239316242.39120405982905
149121.983117.557411324786122.666708333333-5.109297008547014.42558867521369
150123.658120.239481837607121.258833333333-1.019351495726493.41851816239317
151124.794122.938520299145120.382752.55577029914531.85547970085473
152124.827122.832751068376120.0615416666672.77120940170941.99424893162393
153120.382122.936513888889119.9143333333333.02218055555555-2.55451388888888
154117.395123.607821581197119.8026253.80519658119658-6.21282158119658
155115.79123.011664529915119.8275416666673.18412286324787-7.22166452991452
156114.283122.624712606838119.9660833333332.65862927350428-8.34171260683762
157117.271120.866081196581120.0136666666670.85241452991452-3.59508119658118
158117.448117.075199786325119.779875-2.704675213675210.37280021367522
159118.764114.562587606838119.362375-4.799787393162394.2014123931624
160120.55113.804712606838119.021125-5.21641239316246.74528739316241
161123.554113.755786324786118.865083333333-5.109297008547019.79821367521367
162125.412117.887606837607118.906958333333-1.019351495726497.52439316239317
163124.182121.403811965812118.8480416666672.55577029914532.77818803418803
164119.828121.328667735043118.5574583333332.7712094017094-1.50066773504273
165115.361121.252138888889118.2299583333333.02218055555555-5.89113888888888
166114.226121.607696581197117.80253.80519658119658-7.38169658119658
167115.214120.207164529915117.0230416666673.18412286324787-4.99316452991452
168115.864118.615337606838115.9567083333332.65862927350428-2.75133760683758
169114.276NA115.04725NANA
170113.469NA114.614333333333NANA
171114.883NA114.789125NANA
172114.172NA115.308208333333NANA
173111.225NA116.111208333333NANA
174112.149NANANANA
175115.618NANANANA
176118.002NANANANA
177121.382NANANANA
178120.663NANANANA
179128.049NANANANA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/May/16/t1305574233si6kqr0qbwrvigm/19h0a1305573579.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/16/t1305574233si6kqr0qbwrvigm/19h0a1305573579.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/16/t1305574233si6kqr0qbwrvigm/2c7qa1305573579.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/16/t1305574233si6kqr0qbwrvigm/2c7qa1305573579.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/16/t1305574233si6kqr0qbwrvigm/31zdu1305573579.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/16/t1305574233si6kqr0qbwrvigm/31zdu1305573579.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/16/t1305574233si6kqr0qbwrvigm/4qxco1305573579.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/16/t1305574233si6kqr0qbwrvigm/4qxco1305573579.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