Home » date » 2009 » Dec » 03 »

workshop 9 berekening 5

*The author of this computation has been verified*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Thu, 03 Dec 2009 10:49:36 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Dec/03/t12598626335e3kzvm4ujkeaco.htm/, Retrieved Thu, 03 Dec 2009 18:50:39 +0100
 
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/2009/Dec/03/t12598626335e3kzvm4ujkeaco.htm/},
    year = {2009},
}
@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 = {2009},
    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:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
4716.99 4926.65 4920.10 5170.09 5246.24 5283.61 4979.05 4825.20 4695.12 4711.54 4727.22 4384.96 4378.75 4472.93 4564.07 4310.54 4171.38 4049.38 3591.37 3720.46 4107.23 4101.71 4162.34 4136.22 4125.88 4031.48 3761.36 3408.56 3228.47 3090.45 2741.14 2980.44 3104.33 3181.57 2863.86 2898.01 3112.33 3254.33 3513.47 3587.61 3727.45 3793.34 3817.58 3845.13 3931.86 4197.52 4307.13 4229.43 4362.28 4217.34 4361.28 4327.74 4417.65 4557.68 4650.35 4967.18 5123.42 5290.85 5535.66 5514.06 5493.88 5694.83 5850.41 6116.64 6175.00 6513.58 6383.78 6673.66 6936.61 7300.68 7392.93 7497.31 7584.71 7160.79 7196.19 7245.63 7347.51 7425.75 7778.51 7822.33 8181.22 8371.47 8347.71 8672.11 8802.79 9138.46 9123.29 9023.21 8850.41 8864.58 9163.74 8516.66 8553.44 7555.20 7851.22 7442.00 7992.53 8264.04 7517.39 7200.40 7193.69 6193.58 5104.21 4800.46 4461.61 4398.59 4243.63 4293.82
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
14716.99NANA1.01621417709746NA
24926.65NANA1.02316103477131NA
34920.1NANA1.02124609026921NA
45170.09NANA1.00268517095746NA
55246.24NANA1.00029270143372NA
65283.61NANA0.986143298146215NA
74979.054697.62080704794868.13750.964972909464431.05990887824106
84825.24712.678502820784835.139166666670.9746727737041921.02387633637896
94695.124806.532083197384801.399583333331.001068959118060.976820692909373
104711.544784.891235816124750.750416666671.007186405547570.984670239677118
114727.224708.47688689234670.151.008206778560071.00398071681309
124384.964547.179011927974573.937916666670.994149700930310.964325351717528
134378.754537.082968035564464.691666666671.016214177097460.965102474618376
144472.934461.842419506324360.840833333331.023161034771311.00248497805418
154564.074381.466994254124290.314583333331.021246090269211.04167622533397
164310.544251.795807994264240.409583333331.002685170957461.01381632483274
174171.384192.690180660364191.463333333331.000292701433720.994917301364489
184049.384099.952395999024157.56250.9861432981462150.987665126051616
193591.373991.766846025364136.662083333330.964972909464430.899694330488256
203720.464003.69462329624107.732083333330.9746727737041920.929256686649339
214107.234060.227666157674055.892083333331.001068959118061.01157628037317
224101.714013.500177298313984.863333333331.007186405547571.02197827801295
234162.343940.064949148073907.992916666671.008206778560071.05641405756522
244136.223806.350253207883828.749583333330.994149700930311.08666300388781
254125.883814.225688779433753.367916666671.016214177097461.08170840863911
264031.483772.504725013063687.10751.023161034771311.06864809824355
273761.363691.27952562513614.485833333331.021246090269211.01898541518961
283408.563543.849525254253534.359166666671.002685170957460.96182413381546
293228.473442.924120609733441.916666666671.000292701433720.937711633164965
303090.453289.992226820493336.221250.9861432981462150.939348723928953
312741.143128.826151287243242.397916666670.964972909464430.876092140457296
322980.443087.554198562193167.785416666670.9746727737041920.965307751160426
333104.333128.415994527933125.075416666671.001068959118060.992300897780198
343181.573144.644529637663122.207083333331.007186405547571.01174233526693
352863.863176.313447237723150.458333333331.008206778560070.901630159482702
362898.013181.812155754113200.536250.994149700930310.91080486783581
373112.333327.771160386633274.6751.016214177097460.935259622731511
383254.333433.273552349143355.555416666671.023161034771310.947879611216327
393513.473498.855060738963426.064583333331.021246090269211.00417706335568
403587.613512.282071574093502.876251.002685170957461.02144700422428
413727.453606.399039284663605.343751.000292701433721.03356560363862
423793.343669.395657739733720.955833333330.9861432981462151.03377786257496
433817.583694.411248117983828.512916666670.964972909464431.03333920985238
443845.133821.418631203843920.719583333330.9746727737041921.00620486031092
453931.864000.442159470883996.170416666671.001068959118060.98285635518851
464197.524091.528167119094062.334583333331.007186405547571.02590519447787
474307.134155.759447094744121.931666666671.008206778560071.03642428173052
484229.434158.068404754804182.53750.994149700930311.01716219847745
494362.284317.979146424444249.083751.016214177097461.01025962656912
504217.344430.834245396284330.534583333331.023161034771310.95181624191469
514361.284520.990060625914426.9351.021246090269210.964673653672267
524327.744534.281465637134522.138751.002685170957460.954448909446316
534417.654620.234870318544618.882916666671.000292701433720.956152690067773
544557.684658.144428658264723.597916666670.9861432981462150.978432521748323
554650.354655.293878662424824.274166666670.964972909464430.998938009330607
564967.184808.047390932144932.986250.9746727737041921.03309713822039
575123.425062.000710443655056.595416666671.001068959118061.01213340200242
585290.855230.500297561535193.181.007186405547571.01153803632639
595535.665384.772331968775340.940416666671.008206778560071.02802117874797
605514.065463.507916956585495.659166666670.994149700930311.00925267864745
615493.885740.981318078575649.381251.016214177097460.956958348340128
625694.835926.876010364315792.710833333331.023161034771310.960848512781686
635850.416065.552008374155939.363751.021246090269210.964530514604916
646116.646115.032184642066098.656251.002685170957461.00026292835579
6561756261.617664832876259.785416666671.000292701433720.986166886982042
666513.586330.849730620766419.807083333330.9861432981462151.02886346654153
676383.786358.747287362476589.560416666670.964972909464431.00393673651527
686673.666567.111227753166737.760.9746727737041921.01622460295732
696936.616862.24345811696854.915833333331.001068959118061.01083705967837
707300.687008.034484375166958.031251.007186405547571.04175857243244
717392.937111.817100885137053.927083333331.008206778560071.03952757714760
727497.317099.013000219027140.788750.994149700930311.05610596850135
737584.717354.250116955817236.909583333331.016214177097461.03133696561568
747160.797512.953388489637342.884583333331.023161034771310.953125838764131
757196.197600.730832148847442.604583333331.021246090269210.946776061265352
767245.637559.323300876517539.079583333331.002685170957460.958502462668829
777347.517625.70973637147623.478333333331.000292701433720.96351818440656
787425.757605.34502718237712.210833333330.9861432981462150.976385683155674
797778.517538.285541894737811.914166666670.964972909464431.03186725373697
807822.337743.843820287627945.070416666670.9746727737041921.01013529992776
818181.228116.436040444498107.769166666671.001068959118061.00798182345462
828371.478321.505856188758262.130833333331.007186405547571.00600421902895
838347.718467.744735388938398.81751.008206778560070.98582447403176
848672.118471.536905781498521.389583333330.994149700930311.02367611644135
858802.798779.133978527878639.058751.016214177097461.00269457346590
869138.468927.803488494688725.707083333331.023161034771311.02359555872582
879123.298956.477994420848770.146666666671.021246090269211.01862473236501
889023.218775.144245198558751.644583333331.002685170957461.02826913699307
898850.418699.491858636328696.946251.000292701433721.01734792604166
908864.588505.490466334558625.004583333330.9861432981462151.04221855695292
919163.748240.858192953048539.989166666670.964972909464431.11198855573515
928516.668255.277773128598469.794166666670.9746727737041921.03166243875188
938553.448375.390890340898366.44751.001068959118061.02125860297033
947555.28282.68259720398223.584583333331.007186405547570.912168239134324
957851.228144.903482136958078.604166666671.008206778560070.96394266883812
9674427852.07518523817898.28250.994149700930310.947774928848231
977992.537741.360817663287617.843751.016214177097461.03244509437716
988264.047462.78822927197293.8551.023161034771311.10736627465661
997517.397116.574230481976968.520416666671.021246090269211.05632144857019
1007200.46684.402781115386666.502083333331.002685170957461.07719421402050
1017193.696386.529215924416384.660416666671.000292701433721.12638488869087
1026193.586018.600192947036103.170.9861432981462151.02907317340301
1035104.21NANA0.96497290946443NA
1044800.46NANA0.974672773704192NA
1054461.61NANA1.00106895911806NA
1064398.59NANA1.00718640554757NA
1074243.63NANA1.00820677856007NA
1084293.82NANA0.99414970093031NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/03/t12598626335e3kzvm4ujkeaco/12x341259862574.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/03/t12598626335e3kzvm4ujkeaco/12x341259862574.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/03/t12598626335e3kzvm4ujkeaco/2gemz1259862574.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/03/t12598626335e3kzvm4ujkeaco/2gemz1259862574.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/03/t12598626335e3kzvm4ujkeaco/3jneh1259862574.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/03/t12598626335e3kzvm4ujkeaco/3jneh1259862574.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/03/t12598626335e3kzvm4ujkeaco/4xdiu1259862574.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/03/t12598626335e3kzvm4ujkeaco/4xdiu1259862574.ps (open in new window)


 
Parameters (Session):
par1 = FALSE ; par2 = 0.2 ; par3 = 1 ; par4 = 0 ; par5 = 12 ; par6 = 2 ; par7 = 0 ; par8 = 0 ; par9 = 0 ;
 
Parameters (R input):
par1 = multiplicative ; par2 = 12 ; par3 = 1 ; par4 = 0 ; par5 = 12 ; par6 = 2 ; par7 = 0 ; par8 = 0 ; par9 = 0 ;
 
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