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 21:48:31 +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/t1282254504c7qbe60933bt6ye.htm/, Retrieved Thu, 19 Aug 2010 23:48: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/t1282254504c7qbe60933bt6ye.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:
Mertens Jeroen
 
Dataseries X:
» Textbox « » Textfile « » CSV «
349 348 347 345 365 364 349 339 340 340 341 343 341 343 341 335 355 357 337 325 336 338 337 328 326 327 319 310 320 322 303 292 303 315 311 307 308 312 309 310 309 304 287 275 290 298 294 286 294 292 287 281 280 271 264 259 271 279 279 273 286 286 280 277 269 255 252 245 257 267 261 258 271 262 258 253 236 228 235 226 231 235 227 222 233 221 218 220 204 196 208 190 191 194 179 162 179 176 168 170 153 142 155 136 136 144 135 114 135 132 123 123 103 97 113 108 111 121 111 97
 
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
1349NANA1.03561436774875NA
2348NANA1.03341453900063NA
3347NANA1.01808990977100NA
4345NANA1.02029861797101NA
5365NANA0.989489312224291NA
6364NANA0.968191632178452NA
7349344.145327951077347.1666666666670.9912971520434281.01410645926192
8339329.641761837095346.6250.9510040009725051.02838911584125
9340341.533490600328346.1666666666670.98661576485410.99550998469394
10340353.129453412801345.51.022082354306230.962819715869315
11341347.085013235794344.6666666666671.007016479407530.982468233995283
12343336.008035537696343.9583333333330.9768858695220731.02080892039119
13341355.388330532447343.1666666666671.035614367748750.959513778882693
14343353.513890216466342.0833333333331.033414539000630.970258904932907
15341347.508022535169341.3333333333331.018089909771000.98127230995218
16335348.006853612945341.0833333333331.020298617971010.962624719950455
17355337.250940583113340.8333333333330.9894893122242911.05262864318836
18357329.225496258681340.0416666666670.9681916321784521.08436316159273
19337335.843214302713338.7916666666670.9912971520434281.00344442182549
20325320.963850328221337.50.9510040009725051.01257509114392
21336331.420679010573335.9166666666670.98661576485411.01381724581308
22338341.332919573517333.9583333333331.022082354306230.990235575350654
23337333.784003903620331.4583333333331.007016479407531.00963496170808
24328320.947711715898328.5416666666670.9768858695220731.02197332470887
25326337.265079096844325.6666666666671.035614367748750.966598738514492
26327333.663719279829322.8751.033414539000630.980028636933583
27319325.916032365443320.1251.018089909771000.978779711095379
28310324.242398302704317.7916666666671.020298617971010.95607484284209
29320312.43125033482315.750.9894893122242911.02422532847489
30322303.810465913997313.7916666666670.9681916321784521.05987132152041
31303309.449927629557312.1666666666670.9912971520434280.979156797098114
32292295.564118468913310.7916666666670.9510040009725050.987941301916566
33303305.604233163558309.750.98661576485410.991478412662682
34315316.164141598726309.3333333333331.022082354306230.996317920201704
35311311.042215077000308.8751.007016479407530.999864278625366
36307300.555219189624307.6666666666670.9768858695220731.02144291763674
37308317.156900123056306.251.035614367748750.971128169938907
38312315.062257577817304.8751.033414539000630.990280468370411
39309309.117548854221303.6251.018089909771000.999619727658113
40310308.512794608984302.3751.020298617971011.00482056309172
41309297.795054258169300.9583333333330.9894893122242911.03762636612533
42304289.852369883424299.3750.9681916321784521.04880977899979
43287295.323943212938297.9166666666670.9912971520434280.971814194533708
44275281.972686288348296.50.9510040009725050.975271766992292
45290290.804996690746294.750.98661576485410.997231833359445
46298299.086848928860292.6251.022082354306230.996366109266415
47294292.244574128059290.2083333333331.007016479407531.00600670132945
48286280.976798221286287.6250.9768858695220731.01787763904533
49294295.452148998988285.2916666666671.035614367748750.995084994291265
50292293.145257563179283.6666666666671.033414539000630.996093207945102
51287287.313456619959282.2083333333331.018089909771000.99890900821825
52281286.321299668114280.6251.020298617971010.981414936037652
53280276.273661717291279.2083333333330.9894893122242911.01348785207952
54271269.197615063617278.0416666666670.9681916321784521.00669539711916
55264274.754527308037277.1666666666670.9912971520434280.960857688448644
56259263.031856602312276.5833333333330.9510040009725050.984671603453691
57271272.347060089934276.0416666666670.98661576485410.995053884225924
58279281.668862140891275.5833333333331.022082354306230.990524823650702
59279276.887572817094274.9583333333331.007016479407531.00762918740416
60273267.503913937461273.8333333333330.9768858695220731.02054581550468
61286282.37751760616272.6666666666671.035614367748751.01282850853194
62286280.658165216921271.5833333333331.033414539000631.01903324201863
63280275.308479767242270.4166666666671.018089909771001.01704095797094
64277274.800427773525269.3333333333331.020298617971011.00800425328409
65269265.265593118795268.0833333333330.9894893122242911.01407799193743
66255258.224776565595266.7083333333330.9681916321784520.987511746128762
67252263.148089819528265.4583333333330.9912971520434280.957635680246914
68245250.906555589913263.8333333333330.9510040009725050.97645914202590
69257258.411112411370261.9166666666670.98661576485410.99453927349253
70267265.7414121196192601.022082354306231.00473613754944
71261259.432620507364257.6251.007016479407531.00604156674504
72258249.228007461819255.1250.9768858695220731.03519665637709
73271262.312489231028253.2916666666671.035614367748751.03311893686206
74262260.205169132534251.7916666666671.033414539000631.00689775254446
75258254.437636616937249.9166666666671.018089909771001.01400092938462
76253252.523907947825247.51.020298617971011.00188533456513
77236242.177509166895244.750.9894893122242910.97449181309963
78228234.141009715156241.8333333333330.9681916321784520.973772173774143
79235236.672195050369238.750.9912971520434280.992934552155514
80226223.921817062318235.4583333333330.9510040009725051.00928084170157
81231228.977075426556232.0833333333330.98661576485411.00883461617140
82235234.099445900889229.0416666666671.022082354306231.00384688693152
83227227.921396505903226.3333333333331.007016479407530.995957393557478
84222218.496806149770223.6666666666670.9768858695220731.01603315815897
85233229.086528265756221.2083333333331.035614367748751.01708294138407
86221225.887194649888218.5833333333331.033414539000630.978364445769214
87218219.313534729837215.4166666666671.018089909771000.99401069919622
88220216.345819452269212.0416666666671.020298617971011.01689046063835
89204206.143606713394208.3333333333330.9894893122242910.989601391245792
90196197.349727692375203.8333333333330.9681916321784520.9931607319242
91208197.350741352646199.0833333333330.9912971520434281.05396107749261
92190185.406155022931194.9583333333330.9510040009725051.02477719780393
93191188.4436110871331910.98661576485411.01356580304378
94194190.959053196213186.8333333333331.022082354306231.01592460138908
95179183.906384551799182.6251.007016479407530.973321292984162
96162174.129906242309178.250.9768858695220730.930339902524095
97179179.981146995002173.7916666666671.035614367748750.994548612388667
98176174.991528604107169.3333333333331.033414539000631.00576297266466
99168167.77273304768164.7916666666671.018089909771001.00135461196937
100170163.672903299516160.4166666666671.020298617971011.03865695892805
101153154.855077363102156.50.9894893122242910.988020558352428
102142147.810589179244152.6666666666670.9681916321784520.960688951911304
103155147.538059462464148.8333333333330.9912971520434281.05057637713769
104136138.054080807842145.1666666666670.9510040009725050.985121187321503
105136139.565021736653141.4583333333330.98661576485410.97445619473782
106144140.664084011394137.6251.022082354306231.02371547799178
107135134.520618040855133.5833333333331.007016479407531.00356363185158
108114126.628830836799129.6250.9768858695220730.900268913853632
109135130.4874103363431261.035614367748751.03458256740651
110132127.196106175328123.0833333333331.033414539000631.03776761702163
111123123.06161784357120.8751.018089909771000.999499292755533
112123121.287998211304118.8751.020298617971011.01411517886307
113103115.687792087557116.9166666666670.9894893122242910.890327303697229
11497111.543744290559115.2083333333330.9681916321784520.869613985230096
115113NANA0.991297152043428NA
116108NANA0.951004000972505NA
117111NANA0.9866157648541NA
118121NANA1.02208235430623NA
119111NANA1.00701647940753NA
12097NANA0.976885869522073NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Aug/19/t1282254504c7qbe60933bt6ye/19knt1282254509.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/19/t1282254504c7qbe60933bt6ye/19knt1282254509.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/19/t1282254504c7qbe60933bt6ye/29knt1282254509.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/19/t1282254504c7qbe60933bt6ye/29knt1282254509.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/19/t1282254504c7qbe60933bt6ye/39knt1282254509.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/19/t1282254504c7qbe60933bt6ye/39knt1282254509.ps (open in new window)


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