Home » date » 2010 » Dec » 12 »

Classical Decomposition - Additive

*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: Sun, 12 Dec 2010 11:03:52 +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/Dec/12/t12921517316pksus1i5l63l37.htm/, Retrieved Sun, 12 Dec 2010 12:02:15 +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/2010/Dec/12/t12921517316pksus1i5l63l37.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:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
43880 43110 44496 44164 40399 36763 37903 35532 35533 32110 33374 35462 33508 36080 34560 38737 38144 37594 36424 36843 37246 38661 40454 44928 48441 48140 45998 47369 49554 47510 44873 45344 42413 36912 43452 42142 44382 43636 44167 44423 42868 43908 42013 38846 35087 33026 34646 37135 37985 43121 43722 43630 42234 39351 39327 35704 30466 28155 29257 29998 32529 34787 33855 34556 31348 30805 28353 24514 21106 21346 23335 24379 26290 30084 29429 30632 27349 27264 27474 24482 21453 18788 19282 19713 21917 23812 23785 24696 24562 23580 24939 23899 21454 19761 19815 20780 23462 25005 24725 26198 27543 26471 26558 25317 22896 22248 23406 25073 27691 30599 31948 32946 34012 32936 32974 30951 29812 29010 31068 32447 34844 35676 35387 36488 35652 33488 32914 29781 27951
 
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'George Udny Yule' @ 72.249.76.132


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
143880NANA224.824845679014NA
243110NANA2386.51929012346NA
344496NANA2092.54706790123NA
444164NANA3355.3850308642NA
540399NANA2761.19058641975NA
636763NANA1875.26929012346NA
73790339290.931327160538128.33333333331162.59799382716-1387.93132716049
83553236668.755401234637403.25-734.494598765433-1136.75540123456
93553333296.880401234636696.3333333333-3399.452932098772236.11959876544
103211031104.894290123436056.2083333333-4951.314043209881005.10570987655
113337432674.315586419735736.125-3061.80941358025699.684413580253
123546233965.528549382735676.7916666667-1711.263117283951496.47145061728
133350835874.616512345735649.7916666667224.824845679014-2366.61651234568
143608038029.310956790135642.79166666672386.51929012346-1949.31095679012
153456037861.338734567935768.79166666672092.54706790123-3301.3387345679
163873739468.510030864236113.1253355.3850308642-731.5100308642
173814439442.273919753136681.08333333332761.19058641975-1298.27391975309
183759439245.769290123537370.51875.26929012346-1651.76929012345
193642439549.722993827238387.1251162.59799382716-3125.72299382716
203684338777.338734567939511.8333333333-734.494598765433-1934.3387345679
213724637091.463734567940490.9166666667-3399.45293209877154.536265432100
223866136375.852623456841327.1666666667-4951.314043209882285.14737654321
234045439100.440586419842162.25-3061.809413580251353.55941358024
244492841339.570216049443050.8333333333-1711.263117283953588.42978395061
254844144040.866512345743816.0416666667224.8248456790144400.13348765432
264814046908.810956790144522.29166666672386.519290123461231.18904320987
274599847184.338734567945091.79166666672092.54706790123-1186.3387345679
284736948589.593364197545234.20833333333355.3850308642-1220.59336419754
294955448047.440586419845286.252761.190586419751506.55941358025
304751047170.352623456845295.08333333331875.26929012346339.647376543217
314487346172.472993827245009.8751162.59799382716-1299.47299382716
324534443918.588734567944653.0833333333-734.4945987654331425.4112654321
334241340989.672067901244389.125-3399.452932098771423.32793209876
343691239238.769290123544190.0833333333-4951.31404320988-2326.76929012346
354345240726.940586419743788.75-3061.809413580252725.05941358025
364214241648.820216049443360.0833333333-1711.26311728395493.179783950618
374438243315.658179012343090.8333333333224.8248456790141066.34182098765
384363645087.435956790142700.91666666672386.51929012346-1451.43595679012
394416744217.463734567942124.91666666672092.54706790123-50.4637345679002
404442345013.135030864241657.753355.3850308642-590.1350308642
414286843890.107253086441128.91666666672761.19058641975-1022.10725308642
424390842428.644290123440553.3751875.269290123461479.35570987655
434201341240.806327160540078.20833333331162.59799382716772.193672839501
443884639055.713734567939790.2083333333-734.494598765433-209.713734567893
453508736350.755401234639750.2083333333-3399.45293209877-1263.75540123456
463302634747.310956790139698.625-4951.31404320988-1721.31095679013
473464636577.357253086439639.1666666667-3061.80941358025-1931.35725308642
483713537711.611882716139422.875-1711.26311728395-576.611882716054
493798539345.908179012339121.0833333333224.824845679014-1360.90817901235
504312141264.769290123538878.252386.519290123461856.23070987655
514372240647.338734567938554.79166666672092.547067901233074.6612654321
524363041514.676697530938159.29166666673355.38503086422115.32330246914
534223440492.982253086437731.79166666672761.190586419751741.01774691357
543935139085.144290123437209.8751875.26929012346265.855709876552
553932737847.764660493836685.16666666671162.597993827161479.23533950617
563570435376.088734567936110.5833333333-734.494598765433327.9112654321
573046631952.755401234635352.2083333333-3399.45293209877-1486.75540123456
582815529611.685956790134563-4951.31404320988-1456.68595679012
592925730669.523919753133731.3333333333-3061.80941358025-1412.52391975308
602999831210.403549382732921.6666666667-1711.26311728395-1212.40354938271
613252932333.158179012332108.3333333333224.824845679014195.841820987658
623478733571.352623456831184.83333333332386.519290123461215.64737654322
633385532421.130401234630328.58333333332092.547067901231433.86959876543
643455633010.260030864229654.8753355.38503086421545.73996913580
653134831885.607253086429124.41666666672761.19058641975-537.607253086418
663080530518.810956790128643.54166666671875.26929012346286.189043209873
672835329312.056327160528149.45833333331162.59799382716-959.056327160495
682451426959.047067901227693.5416666667-734.494598765433-2445.04706790123
692110623913.713734567927313.1666666667-3399.45293209877-2807.71373456790
702134622013.935956790126965.25-4951.31404320988-667.935956790119
712333523573.315586419826635.125-3061.80941358025-238.315586419751
722437924609.695216049426320.9583333333-1711.26311728395-230.695216049382
732629026361.616512345726136.7916666667224.824845679014-71.616512345674
743008428485.352623456826098.83333333332386.519290123461598.64737654322
752942928204.505401234626111.95833333332092.547067901231224.49459876544
763063229375.218364197526019.83333333333355.38503086421256.78163580247
772734928505.565586419725744.3752761.19058641975-1156.56558641975
782726427256.352623456825381.08333333331875.269290123467.64737654320561
792747426167.056327160525004.45833333331162.597993827161306.94367283950
802448223826.422067901224560.9166666667-734.494598765433655.577932098764
812145320664.963734567924064.4166666667-3399.45293209877788.0362654321
821878818630.602623456823581.9166666667-4951.31404320988157.397376543213
831928220156.648919753123218.4583333333-3061.80941358025-874.64891975309
841971321237.570216049422948.8333333333-1711.26311728395-1524.57021604938
852191722914.533179012322689.7083333333224.824845679014-997.53317901235
862381224946.310956790122559.79166666672386.51929012346-1134.31095679012
872378524628.088734567922535.54166666672092.54706790123-843.088734567904
882469625931.510030864222576.1253355.3850308642-1235.5100308642
892456225400.065586419822638.8752761.19058641975-838.065586419754
902358024580.810956790122705.54166666671875.26929012346-1000.81095679013
912493923976.972993827222814.3751162.59799382716962.027006172844
922389922193.963734567922928.4583333333-734.4945987654331705.0362654321
932145419617.880401234623017.3333333333-3399.452932098771836.11959876543
941976118167.769290123523119.0833333333-4951.314043209881593.23070987655
951981520244.065586419823305.875-3061.80941358025-429.065586419754
962078021839.278549382723550.5416666667-1711.26311728395-1059.27854938271
972346223963.283179012323738.4583333333224.824845679014-501.283179012342
982500526251.5192901235238652386.51929012346-1246.51929012345
992472526076.713734567923984.16666666672092.54706790123-1351.71373456790
1002619827503.260030864224147.8753355.3850308642-1305.2600308642
1012754327162.315586419824401.1252761.19058641975380.684413580249
1022647126604.894290123524729.6251875.26929012346-133.894290123459
1032655826247.306327160525084.70833333331162.59799382716310.693672839509
1042531724759.505401234625494-734.494598765433557.494598765432
1052289622628.588734567926028.0416666667-3399.45293209877267.411265432096
1062224821658.852623456826610.1666666667-4951.31404320988589.147376543209
1072340624099.065586419827160.875-3061.80941358025-693.065586419754
1082507325988.528549382727699.7916666667-1711.26311728395-915.528549382718
1092769128461.32484567928236.5224.824845679014-770.324845679013
1103059931125.102623456828738.58333333332386.51929012346-526.102623456787
1113194831354.047067901229261.52092.54706790123593.952932098764
1123294633186.801697530929831.41666666673355.3850308642-240.801697530864
1133401233193.607253086430432.41666666672761.19058641975818.392746913585
1143293632934.185956790131058.91666666671875.269290123461.81404320987713
1153297432826.806327160531664.20833333331162.59799382716147.193672839509
1163095131439.297067901232173.7916666667-734.494598765433-488.297067901229
1172981229129.172067901232528.625-3399.45293209877682.827932098764
1182901027868.185956790132819.5-4951.314043209881141.81404320987
1193106829973.607253086433035.4166666667-3061.809413580251094.39274691358
1203244731415.486882716033126.75-1711.263117283951031.51311728395
12134844NA33147.25NANA
12235676NA33096NANA
12335387NA32969.7083333333NANA
12436488NANANANA
12535652NANANANA
12633488NANANANA
12732914NANANANA
12829781NANANANA
12927951NANANANA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/12/t12921517316pksus1i5l63l37/1gs651292151828.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t12921517316pksus1i5l63l37/1gs651292151828.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t12921517316pksus1i5l63l37/2gs651292151828.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t12921517316pksus1i5l63l37/2gs651292151828.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t12921517316pksus1i5l63l37/3q15q1292151828.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t12921517316pksus1i5l63l37/3q15q1292151828.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t12921517316pksus1i5l63l37/41b5t1292151828.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t12921517316pksus1i5l63l37/41b5t1292151828.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])
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