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 09:54:22 +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/t1282212089y0re2thv0wbmr34.htm/, Retrieved Thu, 19 Aug 2010 12:01:29 +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/t1282212089y0re2thv0wbmr34.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:
Quaglia Laura
 
Dataseries X:
» Textbox « » Textfile « » CSV «
239 238 237 235 255 254 239 229 230 230 231 233 239 236 231 235 253 257 236 226 226 221 217 219 225 226 225 229 242 252 233 232 225 218 209 211 220 225 215 222 238 246 226 230 222 214 208 203 208 212 199 200 223 225 203 207 195 198 193 189 184 188 180 186 215 212 191 190 180 190 189 181 174 179 165 185 211 209 183 178 170 182 195 188 175 176 162 193 211 207 179 176 167 175 190 173 159 159 147 181 196 199 171 170 156 164 178 155 138 142 113 148 156 158 141 139 119 120 125 102
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time13 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1239NANA-8.3900462962963NA
2238NANA-5.18634259259259NA
3237NANA-16.0335648148148NA
4235NANA0.767361111111108NA
5255NANA20.2118055555556NA
6254NANA23.53125NA
7239238.984953703704237.51.484953703703710.0150462962963047
8229237.258101851852237.416666666667-0.158564814814822-8.25810185185182
9230230.498842592593237.083333333333-6.58449074074074-0.498842592592581
10230233.559027777778236.833333333333-3.27430555555555-3.55902777777774
11231236.336805555556236.75-0.413194444444435-5.33680555555551
12233230.836805555556236.791666666667-5.954861111111112.16319444444449
13239228.401620370370236.791666666667-8.390046296296310.5983796296297
14236231.355324074074236.541666666667-5.186342592592594.64467592592598
15231220.216435185185236.25-16.033564814814810.7835648148149
16235236.475694444444235.7083333333330.767361111111108-1.4756944444444
17253254.961805555556234.7520.2118055555556-1.96180555555551
18257257.114583333333233.58333333333323.53125-0.114583333333314
19236233.901620370370232.4166666666671.484953703703712.09837962962965
20226231.258101851852231.416666666667-0.158564814814822-5.25810185185185
21226224.165509259259230.75-6.584490740740741.83449074074076
22221226.975694444444230.25-3.27430555555555-5.97569444444446
23217229.128472222222229.541666666667-0.413194444444435-12.1284722222222
24219222.920138888889228.875-5.95486111111111-3.92013888888889
25225220.151620370370228.541666666667-8.39004629629634.84837962962962
26226223.480324074074228.666666666667-5.186342592592592.51967592592592
27225212.841435185185228.875-16.033564814814812.1585648148149
28229229.475694444444228.7083333333330.767361111111108-0.475694444444457
29242248.461805555556228.2520.2118055555556-6.46180555555557
30252251.114583333333227.58333333333323.531250.885416666666657
31233228.526620370370227.0416666666671.484953703703714.47337962962965
32232226.633101851852226.791666666667-0.1585648148148225.36689814814815
33225219.748842592593226.333333333333-6.584490740740745.25115740740742
34218222.350694444444225.625-3.27430555555555-4.35069444444443
35209224.753472222222225.166666666667-0.413194444444435-15.7534722222222
36211218.795138888889224.75-5.95486111111111-7.79513888888886
37220215.818287037037224.208333333333-8.39004629629634.18171296296299
38225218.646990740741223.833333333333-5.186342592592596.35300925925927
39215207.591435185185223.625-16.03356481481487.40856481481484
40222224.100694444444223.3333333333330.767361111111108-2.10069444444446
41238243.336805555556223.12520.2118055555556-5.33680555555557
42246246.28125222.7523.53125-0.281249999999972
43226223.401620370370221.9166666666671.484953703703712.59837962962965
44230220.716435185185220.875-0.1585648148148229.28356481481481
45222213.082175925926219.666666666667-6.584490740740748.91782407407405
46214214.809027777778218.083333333333-3.27430555555555-0.809027777777771
47208216.128472222222216.541666666667-0.413194444444435-8.1284722222222
48203209.086805555556215.041666666667-5.95486111111111-6.08680555555557
49208204.818287037037213.208333333333-8.39004629629633.18171296296299
50212206.105324074074211.291666666667-5.186342592592595.8946759259259
51199193.174768518519209.208333333333-16.03356481481485.8252314814815
52200208.184027777778207.4166666666670.767361111111108-8.18402777777777
53223226.336805555556206.12520.2118055555556-3.33680555555554
54225228.447916666667204.91666666666723.53125-3.44791666666669
55203204.818287037037203.3333333333331.48495370370371-1.81828703703701
56207201.174768518519201.333333333333-0.1585648148148225.82523148148147
57195192.957175925926199.541666666667-6.584490740740742.04282407407408
58198194.892361111111198.166666666667-3.274305555555553.10763888888889
59193196.836805555556197.25-0.413194444444435-3.83680555555554
60189190.420138888889196.375-5.95486111111111-1.42013888888886
61184186.943287037037195.333333333333-8.3900462962963-2.94328703703704
62188188.938657407407194.125-5.18634259259259-0.938657407407419
63180176.758101851852192.791666666667-16.03356481481483.24189814814815
64186192.600694444444191.8333333333330.767361111111108-6.60069444444446
65215211.545138888889191.33333333333320.21180555555563.45486111111111
66212214.364583333333190.83333333333323.53125-2.36458333333331
67191191.568287037037190.0833333333331.48495370370371-0.568287037036981
68190189.133101851852189.291666666667-0.1585648148148220.866898148148152
69180181.707175925926188.291666666667-6.58449074074074-1.70717592592590
70190184.350694444444187.625-3.274305555555555.64930555555557
71189187.003472222222187.416666666667-0.4131944444444351.99652777777777
72181181.170138888889187.125-5.95486111111111-0.170138888888886
73174178.276620370370186.666666666667-8.3900462962963-4.27662037037038
74179180.646990740741185.833333333333-5.18634259259259-1.64699074074076
75165168.883101851852184.916666666667-16.0335648148148-3.88310185185185
76185184.934027777778184.1666666666670.7673611111111080.0659722222222285
77211204.295138888889184.08333333333320.21180555555566.70486111111111
78209208.15625184.62523.531250.843750000000028
79183186.443287037037184.9583333333331.48495370370371-3.44328703703701
80178184.716435185185184.875-0.158564814814822-6.71643518518519
81170178.040509259259184.625-6.58449074074074-8.04050925925927
82182181.559027777778184.833333333333-3.274305555555550.4409722222222
83195184.753472222222185.166666666667-0.41319444444443510.2465277777778
84188179.128472222222185.083333333333-5.954861111111118.87152777777777
85175176.443287037037184.833333333333-8.3900462962963-1.44328703703704
86176179.396990740741184.583333333333-5.18634259259259-3.39699074074070
87162168.341435185185184.375-16.0335648148148-6.34143518518516
88193184.725694444444183.9583333333330.7673611111111088.27430555555557
89211203.670138888889183.45833333333320.21180555555567.32986111111111
90207206.15625182.62523.531250.84375
91179182.818287037037181.3333333333331.48495370370371-3.81828703703704
92176179.799768518519179.958333333333-0.158564814814822-3.79976851851856
93167172.040509259259178.625-6.58449074074074-5.0405092592593
94175174.225694444444177.5-3.274305555555550.774305555555543
95190175.961805555556176.375-0.41319444444443514.0381944444445
96173169.461805555556175.416666666667-5.954861111111113.53819444444449
97159166.359953703704174.75-8.3900462962963-7.3599537037037
98159168.980324074074174.166666666667-5.18634259259259-9.9803240740741
99147157.424768518519173.458333333333-16.0335648148148-10.4247685185185
100181173.309027777778172.5416666666670.7673611111111087.69097222222223
101196191.795138888889171.58333333333320.21180555555564.20486111111111
102199193.864583333333170.33333333333323.531255.13541666666666
103171170.193287037037168.7083333333331.484953703703710.80671296296299
104170166.966435185185167.125-0.1585648148148223.03356481481481
105156158.415509259259165-6.58449074074074-2.41550925925927
106164158.934027777778162.208333333333-3.274305555555555.0659722222222
107178158.753472222222159.166666666667-0.41319444444443519.2465277777777
108155149.836805555556155.791666666667-5.954861111111115.16319444444446
109138144.443287037037152.833333333333-8.3900462962963-6.44328703703704
110142145.105324074074150.291666666667-5.18634259259259-3.10532407407408
111113131.424768518518147.458333333333-16.0335648148148-18.4247685185185
112148144.850694444444144.0833333333330.7673611111111083.14930555555554
113156160.253472222222140.04166666666720.2118055555556-4.25347222222223
114158159.15625135.62523.53125-1.15625
115141NANA1.48495370370371NA
116139NANA-0.158564814814822NA
117119NANA-6.58449074074074NA
118120NANA-3.27430555555555NA
119125NANA-0.413194444444435NA
120102NANA-5.95486111111111NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Aug/19/t1282212089y0re2thv0wbmr34/1qdfm1282211644.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/19/t1282212089y0re2thv0wbmr34/1qdfm1282211644.ps (open in new window)


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


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


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