Home » date » 2010 » Aug » 05 »

Tijdreeks 1 - 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, 05 Aug 2010 13:11:05 +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/05/t1281013844ohvj0iwsq7jjv9d.htm/, Retrieved Thu, 05 Aug 2010 15:10:49 +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/05/t1281013844ohvj0iwsq7jjv9d.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:
Mathias Goossenaerts
 
Dataseries X:
» Textbox « » Textfile « » CSV «
36 35 34 32 52 51 36 26 27 27 28 30 28 29 25 28 55 53 42 32 37 41 37 38 39 32 36 39 83 83 66 53 72 77 69 72 81 71 63 66 114 116 109 97 111 120 110 106 115 110 103 112 163 166 156 140 166 176 163 162 171 167 163 168 222 216 197 178 204 220 196 195 213 218 216 225 280 272 252 230 248 259 240 237 252 250 255 255 313 291 271 247 268 283 259 259 267 270 279 269 334 326 301 276 301 313 291 287 289 298 320 312 385 380 351 322 350 363 344 345
 
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
136NANA-7.49652777777779NA
235NANA-11.4363425925926NA
334NANA-12.6354166666667NA
432NANA-14.1307870370370NA
552NANA35.6284722222222NA
651NANA27.5960648148148NA
73640.327546296296334.16666666666676.16087962962964-4.3275462962963
82620.577546296296333.5833333333333-13.00578703703705.42245370370371
92734.633101851851832.95833333333331.67476851851851-7.63310185185185
102740.582175925925932.41666666666678.16550925925926-13.5821759259259
112824.035879629629632.375-8.339120370370383.96412037037038
123020.401620370370432.5833333333333-12.18171296296309.59837962962963
132825.420138888888932.9166666666667-7.496527777777792.57986111111112
142921.980324074074133.4166666666667-11.43634259259267.01967592592593
152521.447916666666734.0833333333333-12.63541666666673.55208333333334
162820.952546296296335.0833333333333-14.13078703703707.04745370370371
175571.670138888888936.041666666666735.6284722222222-16.6701388888889
185364.346064814814836.7527.5960648148148-11.3460648148148
194243.702546296296337.54166666666676.16087962962964-1.70254629629630
203225.119212962963038.125-13.00578703703706.88078703703704
213740.383101851851838.70833333333331.67476851851851-3.38310185185185
224147.790509259259339.6258.16550925925926-6.79050925925926
233732.910879629629641.25-8.339120370370384.08912037037039
243831.484953703703743.6666666666667-12.18171296296306.51504629629628
253938.420138888888945.9166666666667-7.496527777777790.579861111111121
263236.355324074074147.7916666666667-11.4363425925926-4.35532407407407
273637.489583333333350.125-12.6354166666667-1.48958333333332
283938.952546296296353.0833333333333-14.13078703703700.0474537037037095
298391.545138888888955.916666666666735.6284722222222-8.5451388888889
308386.262731481481558.666666666666727.5960648148148-3.26273148148148
316667.99421296296361.83333333333336.16087962962964-1.99421296296296
325352.202546296296365.2083333333333-13.00578703703700.797453703703724
337269.633101851851867.95833333333331.674768518518512.36689814814817
347778.373842592592670.20833333333338.16550925925926-1.37384259259260
356964.285879629629672.625-8.339120370370384.71412037037040
367263.109953703703775.2916666666667-12.18171296296308.8900462962963
378170.961805555555578.4583333333333-7.4965277777777910.0381944444445
387170.646990740740782.0833333333333-11.43634259259260.353009259259267
396372.9062585.5416666666667-12.6354166666667-9.90625
406674.827546296296388.9583333333333-14.1307870370370-8.82754629629629
41114128.08680555555692.458333333333335.6284722222222-14.0868055555556
42116123.17939814814895.583333333333327.5960648148148-7.17939814814815
43109104.57754629629698.41666666666676.160879629629644.42245370370370
449788.4525462962963101.458333333333-13.00578703703708.54745370370372
45111106.424768518519104.751.674768518518514.57523148148148
46120116.498842592593108.3333333333338.165509259259263.5011574074074
47110103.952546296296112.291666666667-8.339120370370386.04745370370374
48106104.234953703704116.416666666667-12.18171296296301.76504629629632
49115112.961805555556120.458333333333-7.496527777777792.03819444444446
50110112.771990740741124.208333333333-11.4363425925926-2.77199074074073
51103115.65625128.291666666667-12.6354166666667-12.6562500000000
52112118.785879629630132.916666666667-14.1307870370370-6.78587962962959
53163173.086805555556137.45833333333335.6284722222222-10.0868055555556
54166169.59606481481514227.5960648148148-3.59606481481481
55156152.827546296296146.6666666666676.160879629629643.17245370370372
56140138.369212962963151.375-13.00578703703701.63078703703701
57166157.924768518519156.251.674768518518518.0752314814815
58176169.248842592593161.0833333333338.165509259259266.75115740740739
59163157.535879629630165.875-8.339120370370385.46412037037038
60162158.234953703704170.416666666667-12.18171296296303.76504629629630
61171166.711805555556174.208333333333-7.496527777777794.28819444444449
62167166.063657407407177.5-11.43634259259260.93634259259261
63163168.03125180.666666666667-12.6354166666667-5.03124999999997
64168169.952546296296184.083333333333-14.1307870370370-1.95254629629630
65222222.920138888889187.29166666666735.6284722222222-0.920138888888886
66216217.637731481481190.04166666666727.5960648148148-1.63773148148150
67197199.327546296296193.1666666666676.16087962962964-2.32754629629630
68178184.035879629630197.041666666667-13.0057870370370-6.03587962962962
69204203.049768518518201.3751.674768518518510.950231481481524
70220214.123842592593205.9583333333338.165509259259265.87615740740742
71196202.410879629630210.75-8.33912037037038-6.41087962962962
72195203.318287037037215.5-12.1817129629630-8.31828703703704
73213212.628472222222220.125-7.496527777777790.371527777777771
74218213.146990740741224.583333333333-11.43634259259264.85300925925927
75216215.947916666667228.583333333333-12.63541666666670.0520833333333428
76225217.910879629630232.041666666667-14.13078703703707.08912037037038
77280271.128472222222235.535.62847222222228.8715277777778
78272266.679398148148239.08333333333327.59606481481485.32060185185185
79252248.619212962963242.4583333333336.160879629629643.38078703703704
80230232.410879629630245.416666666667-13.0057870370370-2.41087962962962
81248250.049768518518248.3751.67476851851851-2.04976851851848
82259259.415509259259251.258.16550925925926-0.415509259259238
83240245.535879629630253.875-8.33912037037038-5.53587962962959
84237243.859953703704256.041666666667-12.1817129629630-6.85995370370367
85252250.128472222222257.625-7.496527777777791.87152777777777
86250247.688657407407259.125-11.43634259259262.31134259259261
87255248.03125260.666666666667-12.63541666666676.96875
88255248.369212962963262.5-14.13078703703706.63078703703707
89313299.920138888889264.29166666666735.628472222222213.0798611111111
90291293.59606481481526627.5960648148148-2.59606481481484
91271273.702546296296267.5416666666676.16087962962964-2.70254629629625
92247255.994212962963269-13.0057870370370-8.99421296296299
93268272.508101851852270.8333333333331.67476851851851-4.50810185185190
94283280.582175925926272.4166666666678.165509259259262.41782407407408
95259265.535879629630273.875-8.33912037037038-6.53587962962968
96259264.026620370370276.208333333333-12.1817129629630-5.02662037037044
97267271.420138888889278.916666666667-7.49652777777779-4.42013888888891
98270269.938657407407281.375-11.43634259259260.0613425925925526
99279271.322916666667283.958333333333-12.63541666666677.67708333333331
100269272.452546296296286.583333333333-14.1307870370370-3.45254629629630
101334324.795138888889289.16666666666735.62847222222229.20486111111114
102326319.262731481482291.66666666666727.59606481481486.73726851851848
103301299.910879629630293.756.160879629629641.08912037037038
104276282.827546296296295.833333333333-13.0057870370370-6.82754629629625
105301300.383101851852298.7083333333331.674768518518510.616898148148096
106313310.373842592593302.2083333333338.165509259259262.62615740740745
107291297.785879629630306.125-8.33912037037038-6.78587962962968
108287298.318287037037310.5-12.1817129629630-11.318287037037
109289307.336805555556314.833333333333-7.49652777777779-18.3368055555556
110298307.396990740741318.833333333333-11.4363425925926-9.39699074074065
111320310.15625322.791666666667-12.63541666666679.84375000000006
112312312.785879629630326.916666666667-14.1307870370370-0.785879629629619
113385366.836805555556331.20833333333335.628472222222218.1631944444445
114380363.429398148148335.83333333333327.596064814814816.5706018518519
115351NANA6.16087962962964NA
116322NANA-13.0057870370370NA
117350NANA1.67476851851851NA
118363NANA8.16550925925926NA
119344NANA-8.33912037037038NA
120345NANA-12.1817129629630NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Aug/05/t1281013844ohvj0iwsq7jjv9d/14jrt1281013862.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/05/t1281013844ohvj0iwsq7jjv9d/14jrt1281013862.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/05/t1281013844ohvj0iwsq7jjv9d/24jrt1281013862.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/05/t1281013844ohvj0iwsq7jjv9d/24jrt1281013862.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/05/t1281013844ohvj0iwsq7jjv9d/397j71281013862.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/05/t1281013844ohvj0iwsq7jjv9d/397j71281013862.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/05/t1281013844ohvj0iwsq7jjv9d/497j71281013862.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/05/t1281013844ohvj0iwsq7jjv9d/497j71281013862.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