Home » date » 2009 » Jun » 06 »

Opgave 9: oefening 3 Jan Vanstraelen

*Unverified author*
R Software Module: rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Sat, 06 Jun 2009 12:36:01 -0600
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Jun/06/t12443134332el4upqx1lu8pzv.htm/, Retrieved Sat, 06 Jun 2009 20:37:13 +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/2009/Jun/06/t12443134332el4upqx1lu8pzv.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 «
11310 64305 15310 37299 21302 61308 72300 26303 18301 54305 66309 50301 31298 52291 87286 81288 14293 90302 50306 15310 44310 26314 98313 76310 25313 48309 95307 10320 87327 63328 34333 90333 81332 7342 30424 13344 88347 40339 23330 1339 10341 46342 81342 2342 76350 35368 93367 88377 39376 41366 77375 56382 79397 26385 73397 28404 98413 73414 47423 52431 24441 92439 90441 441 13448 18458 18459 69477 41491 10492 73508 82515 13525 55533 19550 85558 57563 60570 49568 51570 26561 61558 78548 77537 539 18540 47542 86542 81544 16543 22538 25538 99527 63518 95508 65496 5488 96475 81465 5463 81458 74445 21434 67427 27418 81407 82395 97359
 
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'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
111310NANA-23249.2947048611NA
264305NANA3922.06987847222NA
315310NANA13285.8980034722NA
437299NANA-11273.1176215278NA
521302NANA756.694878472223NA
661308NANA-3196.93012152778NA
77230042038.267795138942387.25-348.98220486111430261.7322048611
82630330612.538628472242719.5-12106.9613715278-4309.53862847222
91830154724.845920138945217.91666666679506.92925347222-36423.8459201389
105430540131.226128472250049.7916666667-9918.5655381944414173.7738715278
116630972910.684461805651590.62521320.0594618056-6601.68446180555
125030163808.866753472252506.666666666711302.2000868056-13507.8667534722
133129829549.038628472252798.3333333333-23249.29470486111748.96137152777
145229155345.944878472251423.8753922.06987847222-3054.94487847222
158728665335.439670138952049.541666666713285.898003472221950.5603298611
168128840693.840711805651966.9583333333-11273.117621527840594.1592881945
171429352890.861545138952134.1666666667756.694878472223-38597.8615451389
189030251354.444878472254551.375-3196.9301215277838947.5551215278
195030655036.726128472255385.7083333333-348.982204861114-4730.72612847222
201531042863.455295138954970.4166666667-12106.9613715278-27553.4552951389
214431064645.637586805555138.70833333339506.92925347222-20335.6375868055
222631442597.351128472252515.9166666667-9918.56553819444-16283.3511284722
239831373922.05946180565260221320.059461805624390.9405381944
247631065823.366753472254521.166666666711302.200086805610486.6332465278
252531329482.413628472252731.7083333333-23249.2947048611-4169.41362847223
264830959114.194878472255192.1253922.06987847222-10805.1948784722
279530773146.564670138959860.666666666713285.898003472222160.4353298611
281032049339.632378472260612.75-11273.1176215278-39019.6323784722
298732757750.236545138956993.5416666667756.69487847222329576.7634548611
306332848344.319878472251541.25-3196.9301215277814983.6801215278
313433351195.101128472251544.0833333333-348.982204861114-16862.1011284722
329033341731.455295138953838.4166666667-12106.961371527848601.5447048611
338133260014.220920138950507.29166666679506.9292534722221317.7790798611
34734237215.476128472247134.0416666667-9918.56553819444-29873.4761284722
353042464872.142795138943552.083333333321320.0594618056-34448.1427951389
361334450938.783420138939636.583333333311302.2000868056-37594.7834201389
378834717638.246961805540887.5416666667-23249.294704861170708.7530381945
384033943102.028211805539179.95833333333922.06987847222-2763.02821180555
392333048591.981336805535306.083333333313285.8980034722-25261.9813368056
40133924993.132378472236266.25-11273.1176215278-23654.1323784722
411034140813.319878472240056.625756.694878472223-30472.3198784722
424634242608.694878472245805.625-3196.930121527783733.30512152778
438134246542.559461805646891.5416666667-348.98220486111434799.4405381944
44234232786.913628472244893.875-12106.9613715278-30444.9136284722
457635056695.470920138947188.54166666679506.9292534722219654.5290798611
463536841815.309461805551733.875-9918.56553819444-6447.30946180555
479336778224.726128472256904.666666666721320.059461805615142.2738715278
488837770252.658420138958950.458333333311302.200086805618124.3415798611
493937634538.580295138957787.875-23249.29470486114837.41970486111
504136662464.819878472258542.753922.06987847222-21098.8198784722
517737573833.856336805660547.958333333313285.89800347223541.14366319445
525638251779.382378472263052.5-11273.11762152784602.61762152779
537939763480.111545138962723.4166666667756.69487847222315916.8884548611
542638556114.403211805559311.3333333333-3196.93012152778-29729.4032118055
557339756842.309461805557191.2916666667-348.98220486111416554.6905381945
562840446590.080295138958697.0416666667-12106.9613715278-18186.0802951389
579841370876.429253472261369.59506.9292534722227536.5707465278
587341449664.476128472259583.0416666667-9918.5655381944423749.5238715278
594742375824.351128472254504.291666666721320.0594618056-28401.3511284722
605243162728.325086805551426.12511302.2000868056-10297.3250868056
612444125557.455295138948806.75-23249.2947048611-1116.45529513890
629243952151.111545138948229.04166666673922.0698784722240287.8884548611
639044160854.564670138947568.666666666713285.898003472229586.4353298611
6444131302.049045138942575.1666666667-11273.1176215278-30861.0490451389
651344841796.986545138941040.2916666667756.694878472223-28348.9865451389
661845840183.736545138943380.6666666667-3196.93012152778-21725.7365451389
671845943830.351128472244179.3333333333-348.982204861114-25371.3511284722
686947730079.788628472242186.75-12106.961371527839397.2113715278
694149147202.137586805537695.20833333339506.92925347222-5711.13758680555
701049228369.392795138938287.9583333333-9918.56553819444-17877.3927951389
717350864992.684461805543672.62521320.05946180568515.31553819445
728251558567.616753472247265.416666666711302.200086805623947.3832465278
731352527066.996961805650316.2916666667-23249.2947048611-13541.9969618056
745553354788.444878472250866.3753922.06987847222744.555121527781
751955062784.064670138949498.166666666713285.8980034722-43234.0646701389
768555839730.715711805651003.8333333333-11273.117621527845827.2842881945
775756354098.278211805653341.5833333333756.6948784722233464.72178819444
786057050147.236545138953344.1666666667-3196.9301215277810422.7634548611
794956852246.684461805552595.6666666667-348.982204861114-2678.68446180554
805157038406.246961805550513.2083333333-12106.961371527813163.7530381945
812656159645.095920138950138.16666666679506.92925347222-33084.0959201389
826155841426.934461805551345.5-9918.5655381944420131.0655381944
837854873705.767795138952385.708333333321320.05946180564842.23220486112
847753762852.658420138951550.458333333311302.200086805614684.3415798611
8553925340.455295138948589.75-23249.2947048611-24801.4552951389
861854050300.903211805546378.83333333333922.06987847222-31760.9032118055
874754261620.314670138948334.416666666713285.8980034722-14078.3146701389
888654240183.215711805551456.3333333333-11273.117621527846358.7842881945
898154453001.361545138952244.6666666667756.69487847222328542.6384548611
901654349252.694878472252449.625-3196.93012152778-32709.6948784722
912253851805.142795138952154.125-348.982204861114-29267.1427951389
922553843500.663628472255607.625-12106.9613715278-17962.6636284722
939952769775.304253472260268.3759506.9292534722229751.6957465278
946351848384.976128472258303.5416666667-9918.5655381944415133.0238715278
959550876241.726128472254921.666666666721320.059461805619266.2738715278
966549668632.866753472257330.666666666611302.2000868056-3136.86675347221
97548836447.955295138959697.25-23249.2947048611-30959.9552951389
989647565318.694878472261396.6253922.0698784722231156.3051215278
998146573423.356336805660137.458333333313285.89800347228041.64366319445
100546346605.174045138957878.2916666667-11273.1176215278-41142.1740451389
1018145858833.986545138958077.2916666667756.69487847222322624.0134548611
1027444555661.611545138958858.5416666667-3196.9301215277818783.3884548611
10321434NANA-348.982204861114NA
10467427NANA-12106.9613715278NA
10527418NANA9506.92925347222NA
10681407NANA-9918.56553819444NA
10782395NANA21320.0594618056NA
10897359NANA11302.2000868056NA
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/06/t12443134332el4upqx1lu8pzv/1fskq1244313357.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/06/t12443134332el4upqx1lu8pzv/1fskq1244313357.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/06/t12443134332el4upqx1lu8pzv/2kkf21244313357.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/06/t12443134332el4upqx1lu8pzv/2kkf21244313357.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/06/t12443134332el4upqx1lu8pzv/37sc81244313357.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/06/t12443134332el4upqx1lu8pzv/37sc81244313357.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/06/t12443134332el4upqx1lu8pzv/4mk6m1244313357.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/06/t12443134332el4upqx1lu8pzv/4mk6m1244313357.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