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 20:14:12 +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/t1282248824f0p5678y3y73dad.htm/, Retrieved Thu, 19 Aug 2010 22:13: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/19/t1282248824f0p5678y3y73dad.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:
Van Boxel Dieter
 
Dataseries X:
» Textbox « » Textfile « » CSV «
356 355 354 352 372 371 356 346 347 347 348 350 353 350 343 346 373 363 349 350 353 356 355 346 349 348 342 342 379 375 363 361 363 373 367 360 358 367 357 346 386 383 367 354 363 370 361 354 363 366 353 351 389 385 364 348 347 352 342 338 343 354 329 320 353 345 324 310 314 313 310 301 294 296 274 269 292 287 271 256 260 265 263 256 246 245 220 224 240 238 222 203 209 214 216 214 206 196 169 177 193 183 164 142 141 137 140 146 136 124 105 114 135 123 100 74 64 57 62 64
 
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
1356NANA-0.76003086419753NA
2355NANA1.46219135802468NA
3354NANA-13.0794753086420NA
4352NANA-10.7600308641975NA
5372NANA19.795524691358NA
6371NANA15.9992283950617NA
7356354.939043209877354.3750.5640432098765461.06095679012350
8346344.471450617284354.041666666667-9.570216049382721.52854938271611
9347349.027006172839353.375-4.34799382716049-2.02700617283944
10347353.906635802469352.6666666666671.23996913580245-6.90663580246911
11348353.119598765432352.4583333333330.661265432098768-5.1195987654321
12350350.962191358025352.166666666667-1.20447530864198-0.962191358024654
13353350.781635802469351.541666666667-0.760030864197532.21836419753089
14350352.878858024691351.4166666666671.46219135802468-2.87885802469134
15343338.753858024691351.833333333333-13.07947530864204.24614197530866
16346341.698302469136352.458333333333-10.76003086419754.30169753086415
17373372.920524691358353.12519.7955246913580.0794753086419178
18363369.249228395062353.2515.9992283950617-6.24922839506172
19349353.480709876543352.9166666666670.564043209876546-4.48070987654319
20350343.096450617284352.666666666667-9.570216049382726.90354938271616
21353348.193672839506352.541666666667-4.347993827160494.80632716049388
22356353.573302469136352.3333333333331.239969135802452.42669753086426
23355353.077932098765352.4166666666670.6612654320987681.92206790123453
24346351.962191358025353.166666666667-1.20447530864198-5.96219135802471
25349353.489969135803354.25-0.76003086419753-4.48996913580254
26348356.753858024691355.2916666666671.46219135802468-8.75385802469134
27342343.087191358025356.166666666667-13.0794753086420-1.08719135802465
28342346.531635802469357.291666666667-10.7600308641975-4.53163580246911
29379378.295524691358358.519.7955246913580.704475308642031
30375375.582561728395359.58333333333315.9992283950617-0.582561728395092
31363361.105709876543360.5416666666670.5640432098765461.89429012345676
32361352.138117283951361.708333333333-9.570216049382728.86188271604942
33363358.777006172839363.125-4.347993827160494.22299382716051
34373365.156635802469363.9166666666671.239969135802457.84336419753095
35367365.036265432099364.3750.6612654320987681.96373456790121
36360363.795524691358365-1.20447530864198-3.79552469135803
37358364.739969135802365.5-0.76003086419753-6.73996913580243
38367366.837191358025365.3751.462191358024680.162808641975346
39357352.003858024691365.083333333333-13.07947530864204.99614197530866
40346354.198302469136364.958333333333-10.7600308641975-8.1983024691358
41386384.378858024691364.58333333333319.7955246913581.62114197530866
42383380.082561728395364.08333333333315.99922839506172.91743827160502
43367364.605709876543364.0416666666670.5640432098765462.39429012345681
44354354.638117283951364.208333333333-9.57021604938272-0.638117283950635
45363359.652006172839364-4.347993827160493.34799382716051
46370365.281635802469364.0416666666671.239969135802454.71836419753083
47361365.036265432099364.3750.661265432098768-4.03626543209879
48354363.378858024691364.583333333333-1.20447530864198-9.37885802469134
49363363.781635802469364.541666666667-0.76003086419753-0.781635802469111
50366365.628858024691364.1666666666671.462191358024680.371141975308717
51353350.170524691358363.25-13.07947530864202.82947530864203
52351351.073302469136361.833333333333-10.7600308641975-0.0733024691357969
53389380.087191358025360.29166666666719.7955246913588.91280864197529
54385374.832561728395358.83333333333315.999228395061710.1674382716050
55364357.89737654321357.3333333333330.5640432098765466.10262345679013
56348346.429783950617356-9.570216049382721.57021604938268
57347350.152006172839354.5-4.34799382716049-3.15200617283949
58352353.448302469136352.2083333333331.23996913580245-1.44830246913574
59342350.077932098765349.4166666666670.661265432098768-8.07793209876536
60338345.045524691358346.25-1.20447530864198-7.04552469135803
61343342.156635802469342.916666666667-0.760030864197530.843364197530832
62354341.128858024691339.6666666666671.4621913580246812.8711419753087
63329323.628858024691336.708333333333-13.07947530864205.37114197530872
64320322.948302469136333.708333333333-10.7600308641975-2.94830246913580
65353350.545524691358330.7519.7955246913582.45447530864197
66345343.874228395062327.87515.99922839506171.12577160493839
67324324.855709876543324.2916666666670.564043209876546-0.855709876543244
68310310.263117283951319.833333333333-9.57021604938272-0.263117283950578
69314310.777006172839315.125-4.347993827160493.22299382716051
70313311.948302469136310.7083333333331.239969135802451.05169753086420
71310306.702932098765306.0416666666670.6612654320987683.29706790123453
72301299.878858024691301.083333333333-1.204475308641981.12114197530866
73294295.698302469136296.458333333333-0.76003086419753-1.69830246913580
74296293.4621913580252921.462191358024682.53780864197529
75274274.420524691358287.5-13.0794753086420-0.420524691358025
76269272.489969135802283.25-10.7600308641975-3.48996913580248
77292299.087191358025279.29166666666719.795524691358-7.08719135802471
78287291.457561728395275.45833333333315.9992283950617-4.45756172839504
79271272.14737654321271.5833333333330.564043209876546-1.14737654320987
80256257.888117283951267.458333333333-9.57021604938272-1.88811728395058
81260258.735339506173263.083333333333-4.347993827160491.26466049382719
82265260.198302469136258.9583333333331.239969135802454.80169753086426
83263255.577932098765254.9166666666670.6612654320987687.42206790123456
84256249.503858024691250.708333333333-1.204475308641986.49614197530863
85246245.864969135802246.625-0.760030864197530.135030864197518
86245243.837191358025242.3751.462191358024681.16280864197535
87220224.962191358025238.041666666667-13.0794753086420-4.96219135802471
88224223.031635802469233.791666666667-10.76003086419750.96836419753086
89240249.503858024691229.70833333333319.795524691358-9.50385802469137
90238241.99922839506222615.9992283950617-3.99922839506172
91222223.14737654321222.5833333333330.564043209876546-1.14737654320987
92203209.304783950617218.875-9.57021604938272-6.30478395061729
93209210.360339506173214.708333333333-4.34799382716049-1.36033950617283
94214211.864969135802210.6251.239969135802452.13503086419755
95216207.369598765432206.7083333333330.6612654320987688.63040123456793
96214201.253858024691202.458333333333-1.2044753086419812.7461419753087
97206196.989969135802197.75-0.760030864197539.01003086419755
98196194.253858024691192.7916666666671.462191358024681.74614197530866
99169174.337191358025187.416666666667-13.0794753086420-5.33719135802471
100177170.614969135802181.375-10.76003086419756.38503086419755
101193194.79552469135817519.795524691358-1.79552469135803
102183184.99922839506216915.9992283950617-1.99922839506172
103164163.814043209877163.250.5640432098765460.185956790123413
104142147.763117283951157.333333333333-9.57021604938272-5.7631172839506
105141147.318672839506151.666666666667-4.34799382716049-6.31867283950618
106137147.614969135802146.3751.23996913580245-10.6149691358025
107140141.994598765432141.3333333333330.661265432098768-1.99459876543207
108146135.212191358025136.416666666667-1.2044753086419810.7878086419753
109136130.489969135802131.25-0.760030864197535.51003086419752
110124127.212191358025125.751.46219135802468-3.2121913580247
111105106.628858024691119.708333333333-13.0794753086420-1.62885802469137
112114102.406635802469113.166666666667-10.760030864197511.5933641975309
113135126.378858024691106.58333333333319.7955246913588.62114197530867
114123115.91589506172899.916666666666615.99922839506177.0841049382716
115100NANA0.564043209876546NA
11674NANA-9.57021604938272NA
11764NANA-4.34799382716049NA
11857NANA1.23996913580245NA
11962NANA0.661265432098768NA
12064NANA-1.20447530864198NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Aug/19/t1282248824f0p5678y3y73dad/1w9n01282248850.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/19/t1282248824f0p5678y3y73dad/1w9n01282248850.ps (open in new window)


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


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


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