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 17:43:53 +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/t1282239996w7cqtoxrrrmntka.htm/, Retrieved Thu, 19 Aug 2010 19:46:38 +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/t1282239996w7cqtoxrrrmntka.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 time3 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1356NANA0.999680280036078NA
2355NANA1.00216775921535NA
3354NANA0.942797743889616NA
4352NANA0.96371463719253NA
5372NANA1.08236418384345NA
6371NANA1.06880646335053NA
7356354.030652813787354.3750.9990282971817611.00556264597588
8346339.891313109465354.0416666666670.9600319541752581.01797247136048
9347346.022256304233353.3750.9791928017098921.00282566707185
10347352.001608328932352.6666666666670.998114201310770.985790950351972
11348353.112274564383352.4583333333331.001855371739590.985522240565866
12350352.957740888081352.1666666666671.002246306355170.991620127438943
13353351.429271777683351.5416666666670.9996802800360781.00446954294493
14350352.178453384262351.4166666666671.002167759215350.993814347915587
15343331.70767289183351.8333333333330.9427977438896161.03404300844091
16346339.669254833817352.4583333333330.963714637192531.01863796936605
17373382.209852419718353.1251.082364183843450.975903676052797
18363377.555883178574353.251.068806463350530.961447076241984
19349352.573736547063352.9166666666670.9990282971817610.98986386058683
20350338.571269172474352.6666666666670.9600319541752581.03375576095237
21353345.206262302808352.5416666666670.9791928017098921.0225770460976
22356351.668903595161352.3333333333330.998114201310771.01231583560719
23355353.070530590561352.4166666666671.001855371739591.00546482711602
24346353.959987194436353.1666666666671.002246306355170.977511618594157
25349354.136739202781354.250.9996802800360780.985495040095686
26348356.061853451221355.2916666666671.002167759215350.977358278138813
27342335.793129782018356.1666666666670.9427977438896161.0184842084828
28342344.327208913581357.2916666666670.963714637192530.993241286621165
29379388.027559907877358.51.082364183843450.976734745568021
30375384.324990779794359.5833333333331.068806463350530.975736704602858
31363360.191327313074360.5416666666670.9990282971817611.0077977243591
32361347.251558091476361.7083333333330.9600319541752581.03959216766107
33363355.569386120904363.1250.9791928017098921.02089778864306
34373363.230393093678363.9166666666670.998114201310771.02689644669631
35367365.051051077613364.3751.001855371739591.00533883936681
36360365.8199018196393651.002246306355170.984090800443908
37358365.383142353187365.50.9996802800360780.979793423676755
38367366.167045023309365.3751.002167759215351.00227479503689
39357344.199742998367365.0833333333330.9427977438896161.03718845601141
40346351.715687798724364.9583333333330.963714637192530.983749124656632
41386394.611942026258364.5833333333331.082364183843450.978176174846516
42383389.134619864871364.0833333333331.068806463350530.98423522464539
43367363.68792635321364.0416666666670.9990282971817611.00910691119169
44354349.651637976914364.2083333333330.9600319541752581.01243626956317
45363356.4261798224013640.9791928017098921.01844370742036
46370363.355157368842364.0416666666670.998114201310771.01828745924312
47361365.051051077613364.3751.001855371739590.988902782047457
48354365.402299191991364.5833333333331.002246306355170.968795217717008
49363364.425115418152364.5416666666670.9996802800360780.996089414922688
50366364.956092314258364.1666666666671.002167759215351.00286036514454
51353342.471280467903363.250.9427977438896161.03074336486759
52351348.704079557497361.8333333333330.963714637192531.00658415136816
53389389.966795737263360.2916666666671.082364183843450.997520825496347
54385383.523385932281358.8333333333331.068806463350531.00385012784587
55364356.986111526283357.3333333333330.9990282971817611.01964751077774
56348341.7713756863923560.9600319541752581.0182245347525
57347347.123848206157354.50.9791928017098920.99964321608326
58352351.544139319997352.2083333333330.998114201310771.00129673810203
59342350.064964475342349.4166666666671.001855371739590.97696152059253
60338347.027783575479346.251.002246306355170.973985415569714
61343342.807029362372342.9166666666670.9996802800360781.00056291330428
62354340.402982213481339.6666666666671.002167759215351.03994388562081
63329317.447857015499336.7083333333330.9427977438896161.03639067874992
64320321.599605386457333.7083333333330.963714637192530.99502609655091
65353357.991953806221330.751.082364183843450.986055681550532
66345350.434919171054327.8751.068806463350530.984490931486193
67324323.976551540235324.2916666666670.9990282971817611.00007237702745
68310307.050220010387319.8333333333330.9600319541752581.00960683235958
69314308.56813163883315.1250.9791928017098921.01760346518068
70313310.1223999656310.7083333333330.998114201310771.00927891708151
71310306.609487726137306.0416666666671.001855371739591.01105808009728
72301301.759658738437301.0833333333331.002246306355170.997482570262662
73294296.363549685696296.4583333333330.9996802800360780.992024830016369
74296292.6329856908832921.002167759215351.01150592883836
75274271.054351368265287.50.9427977438896161.01086737260208
76269272.972170984784283.250.963714637192530.985448439778846
77292302.295296845943279.2916666666671.082364183843450.965942914251854
78287294.411647050431275.4583333333331.068806463350530.974825564393649
79271271.319435042947271.5833333333330.9990282971817610.99882266066603
80256256.768546410458267.4583333333330.9600319541752580.997006851418518
81260257.609306249844263.0833333333330.9791928017098921.00928030817271
82265258.469990047768258.9583333333330.998114201310771.02526409333256
83263255.389631845951254.9166666666671.001855371739591.02979904900227
84256251.271501055795250.7083333333331.002246306355171.01881828589528
85246246.546149063898246.6250.9996802800360780.997784799860101
86245242.900410639821242.3751.002167759215351.00864382795669
87220224.425146285057238.0416666666670.9427977438896160.980282306335509
88224225.308451220304233.7916666666670.963714637192530.99419262254382
89240248.628072730372229.7083333333331.082364183843450.965297270595307
90238241.5502607172192261.068806463350530.985302186357913
91222222.36704848104222.5833333333330.9990282971817610.998349357588961
92203210.12699397011218.8750.9600319541752580.966082444547208
93209210.240854467128214.7083333333330.9791928017098920.994097938432218
94214210.227803651081210.6250.998114201310771.01794337515498
95216207.091854133338206.7083333333331.001855371739591.04301543343625
96214202.913116774158202.4583333333331.002246306355171.05463857340569
97206197.686775377134197.750.9996802800360781.04205250759443
98196193.209592578727192.7916666666671.002167759215351.01444238551529
99169176.696010500646187.4166666666670.9427977438896160.956444910788648
100177174.793742320795181.3750.963714637192531.01262206329535
101193189.4137321726041751.082364183843451.01893351546512
102183180.6282923062391691.068806463350531.01313032229602
103164163.091369514923163.250.9990282971817611.00557129716784
104142151.045027456907157.3333333333330.9600319541752580.940117012726634
105141148.510908259334151.6666666666670.9791928017098920.949425208239803
106137146.098966216864146.3750.998114201310770.937720529771869
107140141.595559205862141.3333333333331.001855371739590.988731573117047
108146136.723100291952136.4166666666671.002246306355171.06785173601417
109136131.208036754735131.250.9996802800360781.03652187292629
110124126.022595721331125.751.002167759215350.98395053117456
111105112.860746591453119.7083333333330.9427977438896160.930350039062668
112114109.060373108955113.1666666666670.963714637192531.04529259116059
113135115.361982594648106.5833333333331.082364183843451.17022954151504
114123106.79157912977499.91666666666661.068806463350531.15177620747166
115100NANA0.999028297181761NA
11674NANA0.960031954175258NA
11764NANA0.979192801709892NA
11857NANA0.99811420131077NA
11962NANA1.00185537173959NA
12064NANA1.00224630635517NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Aug/19/t1282239996w7cqtoxrrrmntka/1u2g71282239828.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/19/t1282239996w7cqtoxrrrmntka/1u2g71282239828.ps (open in new window)


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


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


http://www.freestatistics.org/blog/date/2010/Aug/19/t1282239996w7cqtoxrrrmntka/4ncgs1282239828.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/19/t1282239996w7cqtoxrrrmntka/4ncgs1282239828.ps (open in new window)


 
Parameters (Session):
par1 = multiplicative ; par2 = 12 ;
 
Parameters (R input):
par1 = multiplicative ; 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