Home » date » 2010 » May » 19 »

Opgave 9 oefening 2 multiplicatief decompositiemodel

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Wed, 19 May 2010 15:11:30 +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/May/19/t1274281961e1241pd40nl6qmw.htm/, Retrieved Wed, 19 May 2010 17:12:42 +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/May/19/t1274281961e1241pd40nl6qmw.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:
KDGP2W52
 
Dataseries X:
» Textbox « » Textfile « » CSV «
41086 39690 43129 37863 35953 29133 24693 22205 21725 27192 21790 13253 37702 30364 32609 30212 29965 28352 25814 22414 20506 28806 22228 13971 36845 35338 35022 34777 26887 23970 22780 17351 21382 24561 17409 11514 31514 27071 29462 26105 22397 23843 21705 18089 20764 25316 17704 15548 28029 29383 36438 32034 22679 24319 18004 17537 20366 22782 19169 13807 29743 25591 29096 26482 22405 27044 17970 18730 19684 19785 18479 10698 31956 29506 34506 27165 26736 23691 18157 17328 18205 20995 17382 9367 31124 26551 30651 25859 25100 25778 20418 18688 20424 24776 19814 12738 31566 30111 30019 31934 25826 26835 20205 17789 20520 22518 15572 11509 25447 24090 27786 26195 20516 22759 19028 16971 20036 22485 18730 14538
 
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
141086NANA1.32447931227975NA
239690NANA1.20604412240431NA
343129NANA1.34086864871403NA
437863NANA1.22312080130904NA
535953NANA1.0442291266041NA
629133NANA1.06794958243662NA
72469325515.131892899129668.33333333330.860012310305010.967778654002258
82220522645.238014178229138.750.7771520059775440.98055935583885
92172523972.306574730428311.83333333330.8467239225552470.9062540532875
102719227537.843154034927554.70833333330.9993879383844530.987441167701464
112179021213.696460606326986.41666666670.7860879316670921.02716657799191
121325313991.60499588826704.3750.5239442973628090.947210845638865
133770235388.155691784426718.54166666671.324479312279751.06538471030726
143036432290.575081414426773.95833333331.206044122404310.94033630319197
153260935843.933108842426731.8751.340868648714030.909749493756188
163021232716.442900348126748.33333333331.223120801309040.92345002456482
172996528020.670345106726833.83333333331.04422912660411.06938911992278
182835228708.6206750612268821.067949582436620.987577923749888
192581423113.870020988826876.20833333330.860012310305011.11681860184207
202241421020.213169679127047.750.7771520059775441.0663069788622
212050623162.591543623527355.54166666670.8467239225552470.88530680866948
222880627629.370432725327646.29166666670.9993879383844531.0425861881341
232222821781.120932614727708.250.7860879316670921.02051680759534
241397114354.720224972827397.41666666670.5239442973628090.973268707508126
253684535878.047477413927088.41666666671.324479312279751.02695109100335
263533832262.93657027626751.04166666671.206044122404311.09531257091325
273502235635.707381602526576.58333333331.340868648714030.982778302250867
283477732334.676320239526436.20833333331.223120801309041.07553264661047
292688727211.088205159926058.54166666671.04422912660410.988089847685752
302397027505.441976748525755.3751.067949582436620.871463909587886
312278021870.865561827925430.8750.860012310305011.04156828798577
321735119323.334145960724864.29166666670.7771520059775440.897929926012638
332138220565.371751675624288.16666666670.8467239225552471.03970889795648
342456123680.66376467623695.16666666670.9993879383844531.03717531924241
351740918195.380832315323146.750.7860879316670920.956781293034624
361151412026.813880777422954.3750.5239442973628090.957360786833406
373151430336.260474921422904.29166666671.324479312279751.03882283137871
382707127606.651472865122890.251.206044122404310.980597013969925
392946230699.522929469922895.251.340868648714030.95968918043733
402610528010.638507411722900.95833333331.223120801309040.931967330665901
412239723959.532743102522944.70833333331.04422912660410.934784506865964
422384324696.423089645323125.08333333331.067949582436620.965443453631018
432170519907.529125094123147.95833333330.860012310305011.09029100817138
441808917951.498948742523099.08333333330.7771520059775441.00765958606856
452076419886.228605459423486.08333333330.8467239225552471.04413966126788
462531624009.087625927624023.79166666670.9993879383844531.05443407073333
471770419088.245708033824282.58333333330.7860879316670920.927481774427747
481554812739.268970128924314.16666666670.5239442973628091.22047819513483
492802932025.633837734224179.79166666671.324479312279750.87520516040419
502938328948.174551686224002.58333333331.206044122404311.01502082445777
513643832131.2354291343239631.340868648714031.13403669399405
523203429160.21917054223840.83333333331.223120801309041.09855141391945
532267924848.780863499823796.29166666671.04422912660410.912680590833856
542431925400.958328758623784.79166666671.067949582436620.957404822497046
551800420454.246117524223783.66666666670.860012310305010.880208436749718
561753718416.23584831723697.08333333330.7771520059775440.952257570137636
572036619672.078013379823233.16666666670.8467239225552471.03527446292904
582278222682.025367245422695.91666666670.9993879383844531.00440765897824
591916917650.163344376522453.16666666670.7860879316670921.08605227192458
601380711817.716444104922555.29166666670.5239442973628091.16833062168178
612974330022.524437825122667.41666666671.324479312279750.99068950919154
622559127396.146521667222715.70833333331.206044122404310.934109473380152
632909630487.3304658109227371.340868648714030.954363650586883
642648227622.603433196422583.70833333331.223120801309040.958707605676818
652240523422.146328823922430.08333333331.04422912660410.956573308246643
662704423785.15061053222271.79166666671.067949582436621.13701192995705
671797019121.907879630522234.45833333330.860012310305010.939759783025755
681873017477.986707767122489.79166666670.7771520059775441.07163372493449
691968419371.632141526522878.33333333330.8467239225552471.01612501498023
701978523118.049996529723132.20833333330.9993879383844530.855824777737309
711847918348.17667403323341.1250.7860879316670921.00713004503342
721069812250.800067923381.8750.5239442973628090.873249089096742
733195630794.088823866123249.95833333331.324479312279751.03773163033918
742950627979.419610364923199.33333333331.206044122404311.05456083117141
753450630946.298630360323079.29166666671.340868648714031.11502834029228
762716528215.052571330523068.08333333331.223120801309040.96278395836138
772673624093.281090401723072.79166666671.04422912660411.10968696624102
782369124532.537326640622971.6251.067949582436620.965697093805021
791815719678.371678244122881.50.860012310305010.922688131766204
801732817659.775514498622723.70833333330.7771520059775440.981212925712094
811820519000.449541976322439.95833333330.8467239225552470.958135225157754
822099522211.313648266322224.91666666670.9993879383844530.945239004431365
831738217374.377495016622102.33333333330.7860879316670921.00043872104112
84936711590.237294999922121.1250.5239442973628090.808180174537153
853112429538.92392892922302.29166666671.324479312279751.05366058949489
862655127079.509687697622453.16666666671.206044122404310.98048304072737
873065130306.704284923722602.29166666671.340868648714031.01136038124896
882585927951.113295081322852.29166666671.223120801309040.925150985114804
892510024133.353383135123111.16666666671.04422912660411.04005438454899
902577824939.782100743123352.95833333331.067949582436621.03360967212428
912041820220.466104506323511.83333333330.860012310305011.00976900801756
921868818401.858536206423678.58333333330.7771520059775441.01554959588623
932042420152.52327910323800.58333333330.8467239225552471.01347110320316
942477624012.668766040224027.3750.9993879383844531.0317886879379
951981419110.387184775724310.750.7860879316670921.03681834430779
961273812776.403522204524385.04166666670.5239442973628090.996994183681054
973156632344.060739061424420.20833333331.324479312279750.975944246910166
983011129395.968683967224373.8751.206044122404311.02432412837692
993001932637.301604969824340.41666666671.340868648714030.919775794069596
1003193429661.087138678124250.33333333331.223120801309041.07662945227513
1012582625040.09234140323979.51.04422912660411.03138597285831
1022683525365.449005142623751.54166666671.067949582436621.0579351461336
1032020520163.311119717323445.3750.860012310305011.00206756122718
1041778917827.510822455522939.54166666670.7771520059775440.99783980933519
1052052019132.256232587422595.6250.8467239225552471.07253424533636
1062251822249.831725058222263.45833333330.9993879383844531.01205259789178
1071557217139.140681465221803.08333333330.7860879316670920.908563637431369
1081150911218.6952951325214120.5239442973628091.02587686867594
1092544728069.855625058721193.1251.324479312279750.906559703758605
1102409025459.5914239549211101.206044122404310.94620528659913
1112778628232.995050160521055.751.340868648714030.984167636151733
1122619525727.37775156821034.20833333331.223120801309041.01817605559912
1132051622100.500330918621164.41666666671.04422912660410.928304775584565
1142275922877.838444453621422.20833333331.067949582436620.994805521302106
11519028NANA0.86001231030501NA
11616971NANA0.777152005977544NA
11720036NANA0.846723922555247NA
11822485NANA0.999387938384453NA
11918730NANA0.786087931667092NA
12014538NANA0.523944297362809NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/May/19/t1274281961e1241pd40nl6qmw/139ur1274281885.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/19/t1274281961e1241pd40nl6qmw/139ur1274281885.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/May/19/t1274281961e1241pd40nl6qmw/239ur1274281885.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/19/t1274281961e1241pd40nl6qmw/239ur1274281885.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/May/19/t1274281961e1241pd40nl6qmw/3wicc1274281885.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/19/t1274281961e1241pd40nl6qmw/3wicc1274281885.ps (open in new window)


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