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 19:30:54 +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/t1282246234ild9sgpk20ltr6f.htm/, Retrieved Thu, 19 Aug 2010 21:30:39 +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/t1282246234ild9sgpk20ltr6f.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:
Gregory Goris
 
Dataseries X:
» Textbox « » Textfile « » CSV «
159 158 157 155 175 174 159 149 150 150 151 153 146 156 154 151 171 167 144 138 138 132 132 132 125 131 129 131 145 156 126 123 127 116 114 114 109 110 113 114 138 155 126 123 124 124 134 131 126 128 128 124 148 174 146 137 152 159 170 166 165 168 175 180 199 228 206 193 201 214 225 224 215 222 238 248 262 288 261 240 248 260 266 268 256 261 287 295 304 331 299 275 293 309 311 311 289 298 319 325 331 348 320 305 322 337 346 343 321 331 343 345 347 363 322 304 323 340 352 351
 
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
1159NANA-12.9899691358025NA
2158NANA-8.5733024691358NA
3157NANA-1.09182098765433NA
4155NANA0.227623456790112NA
5175NANA13.0841049382716NA
6174NANA29.5702160493827NA
7159157.787808641975156.9583333333330.8294753086419681.21219135802471
8149144.056327160494156.333333333333-12.27700617283954.94367283950618
9150150.185956790123156.125-5.93904320987653-0.185956790123441
10150153.264660493827155.833333333333-2.56867283950617-3.26466049382719
11151156.588734567901155.51.08873456790124-5.58873456790121
12153153.681327160494155.041666666667-1.36033950617285-0.681327160493822
13146141.135030864198154.125-12.98996913580254.86496913580248
14156144.468364197531153.041666666667-8.573302469135811.5316358024691
15154150.991512345679152.083333333333-1.091820987654333.00848765432099
16151151.060956790123150.8333333333330.227623456790112-0.0609567901234414
17171162.375771604938149.29166666666713.08410493827168.62422839506175
18167177.195216049383147.62529.5702160493827-10.1952160493827
19144146.704475308642145.8750.829475308641968-2.70447530864197
20138131.681327160494143.958333333333-12.27700617283956.31867283950618
21138135.935956790123141.875-5.939043209876532.06404320987653
22132137.431327160494140-2.56867283950617-5.43132716049379
23132139.172067901235138.0833333333331.08873456790124-7.17206790123456
24132135.181327160494136.541666666667-1.36033950617285-3.18132716049382
25125122.343364197531135.333333333333-12.98996913580252.65663580246914
26131125.385030864198133.958333333333-8.57330246913585.61496913580248
27129131.783179012346132.875-1.09182098765433-2.78317901234567
28131131.977623456790131.750.227623456790112-0.977623456790099
29145143.417438271605130.33333333333313.08410493827161.58256172839506
30156158.403549382716128.83333333333329.5702160493827-2.40354938271606
31126128.246141975309127.4166666666670.829475308641968-2.24614197530863
32123113.597993827160125.875-12.27700617283959.40200617283953
33127118.394290123457124.333333333333-5.939043209876538.6057098765432
34116120.389660493827122.958333333333-2.56867283950617-4.38966049382715
35114123.047067901235121.9583333333331.08873456790124-9.04706790123457
36114120.264660493827121.625-1.36033950617285-6.26466049382715
37109108.593364197531121.583333333333-12.98996913580250.40663580246914
38110113.010030864198121.583333333333-8.5733024691358-3.01003086419753
39113120.366512345679121.458333333333-1.09182098765433-7.36651234567901
40114121.894290123457121.6666666666670.227623456790112-7.89429012345677
41138135.917438271605122.83333333333313.08410493827162.08256172839506
42155153.945216049383124.37529.57021604938271.05478395061728
43126126.621141975309125.7916666666670.829475308641968-0.621141975308646
44123114.972993827160127.25-12.27700617283958.02700617283952
45124122.685956790123128.625-5.939043209876531.31404320987653
46124127.097993827160129.666666666667-2.56867283950617-3.09799382716049
47134131.588734567901130.51.088734567901242.41126543209876
48131130.347993827160131.708333333333-1.360339506172850.65200617283952
49126120.343364197531133.333333333333-12.98996913580255.65663580246914
50128126.176697530864134.75-8.57330246913581.82330246913580
51128135.408179012346136.5-1.09182098765433-7.40817901234567
52124139.35262345679139.1250.227623456790112-15.3526234567901
53148155.167438271605142.08333333333313.0841049382716-7.16743827160494
54174174.611882716049145.04166666666729.5702160493827-0.611882716049394
55146148.954475308642148.1250.829475308641968-2.95447530864195
56137139.139660493827151.416666666667-12.2770061728395-2.13966049382714
57152149.102623456790155.041666666667-5.939043209876532.89737654320984
58159156.764660493827159.333333333333-2.568672839506172.23533950617283
59170164.880401234568163.7916666666671.088734567901245.1195987654321
60166166.806327160494168.166666666667-1.36033950617285-0.806327160493794
61165159.926697530864172.916666666667-12.98996913580255.0733024691358
62168169.176697530864177.75-8.5733024691358-1.17669753086417
63175181.033179012346182.125-1.09182098765433-6.03317901234567
64180186.685956790123186.4583333333330.227623456790112-6.68595679012341
65199204.125771604938191.04166666666713.0841049382716-5.12577160493825
66228225.320216049383195.7529.57021604938272.67978395061726
67206201.079475308642200.250.8294753086419684.92052469135803
68193192.306327160494204.583333333333-12.27700617283950.693672839506178
69201203.519290123457209.458333333333-5.93904320987653-2.51929012345678
70214212.347993827160214.916666666667-2.568672839506171.65200617283952
71225221.463734567901220.3751.088734567901243.53626543209879
72224224.139660493827225.5-1.36033950617285-0.139660493827165
73215217.301697530864230.291666666667-12.9899691358025-2.30169753086423
74222225.968364197531234.541666666667-8.5733024691358-3.96836419753083
75238237.366512345679238.458333333333-1.091820987654330.633487654321016
76248242.560956790123242.3333333333330.2276234567901125.43904320987659
77262259.042438271605245.95833333333313.08410493827162.95756172839509
78288279.070216049383249.529.57021604938278.92978395061726
79261253.871141975309253.0416666666670.8294753086419687.12885802469134
80240244.097993827160256.375-12.2770061728395-4.09799382716048
81248254.10262345679260.041666666667-5.93904320987653-6.1026234567901
82260261.472993827160264.041666666667-2.56867283950617-1.47299382716045
83266268.838734567901267.751.08873456790124-2.83873456790116
84268269.931327160494271.291666666667-1.36033950617285-1.93132716049377
85256261.676697530864274.666666666667-12.9899691358025-5.67669753086415
86261269.135030864198277.708333333333-8.5733024691358-8.13503086419752
87287279.949845679012281.041666666667-1.091820987654337.0501543209877
88295285.185956790123284.9583333333330.2276234567901129.81404320987656
89304301.959104938272288.87513.08410493827162.04089506172841
90331322.111882716049292.54166666666729.57021604938278.88811728395063
91299296.537808641975295.7083333333330.8294753086419682.46219135802465
92275286.347993827161298.625-12.2770061728395-11.3479938271605
93293295.560956790123301.5-5.93904320987653-2.56095679012338
94309301.514660493827304.083333333333-2.568672839506177.48533950617292
95311307.547067901235306.4583333333331.088734567901243.45293209876547
96311306.931327160494308.291666666667-1.360339506172854.06867283950618
97289296.885030864198309.875-12.9899691358025-7.88503086419752
98298303.426697530864312-8.5733024691358-5.4266975308642
99319313.366512345679314.458333333333-1.091820987654335.63348765432102
100325317.060956790123316.8333333333330.2276234567901127.9390432098765
101331332.542438271605319.45833333333313.0841049382716-1.54243827160491
102348351.820216049383322.2529.5702160493827-3.82021604938268
103320325.746141975309324.9166666666670.829475308641968-5.7461419753086
104305315.347993827160327.625-12.2770061728395-10.3479938271605
105322324.060956790123330-5.93904320987653-2.06095679012338
106337329.264660493827331.833333333333-2.568672839506177.73533950617286
107346334.422067901235333.3333333333331.0887345679012411.5779320987654
108343333.264660493827334.625-1.360339506172859.7353395061728
109321322.343364197531335.333333333333-12.9899691358025-1.34336419753083
110331326.801697530864335.375-8.57330246913584.19830246913585
111343334.283179012346335.375-1.091820987654338.71682098765433
112345335.769290123457335.5416666666670.2276234567901129.23070987654319
113347349.000771604938335.91666666666713.0841049382716-2.00077160493822
114363366.070216049383336.529.5702160493827-3.07021604938268
115322NANA0.829475308641968NA
116304NANA-12.2770061728395NA
117323NANA-5.93904320987653NA
118340NANA-2.56867283950617NA
119352NANA1.08873456790124NA
120351NANA-1.36033950617285NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Aug/19/t1282246234ild9sgpk20ltr6f/1wcnx1282246251.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/19/t1282246234ild9sgpk20ltr6f/1wcnx1282246251.ps (open in new window)


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


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


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