Home » date » 2010 » Dec » 28 »

classical decomposition

*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: Tue, 28 Dec 2010 11:31:20 +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/28/t12935359241iwk24rb26t4hek.htm/, Retrieved Tue, 28 Dec 2010 12:32:10 +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/28/t12935359241iwk24rb26t4hek.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 «
621 587 655 517 646 657 382 345 625 654 606 510 614 647 580 614 636 388 356 639 753 611 639 630 586 695 552 619 681 421 307 754 690 644 643 608 651 691 627 634 731 475 337 803 722 590 724 627 696 825 677 656 785 412 352 839 729 696 641 695 638 762 635 721 854 418 367 824 687 601 676 740 691 683 594 729 731 386 331 706 715 657 653 642 643 718 654 632 731 392 344 792 852 649 629 685 617 715 715 629 916 531 357 917 828 708 858 775 785 1006 789 734 906 532 387 991 841 892 782 813 793 978 775 797 946 594 438 1022 868 795
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time4 seconds
R Server'George Udny Yule' @ 72.249.76.132


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1621NANA13.6458333333334NA
2587NANA101.854166666667NA
3655NANA-4.24768518518518NA
4517NANA9.76157407407406NA
5646NANA119.289351851852NA
6657NANA-218.039351851852NA
7382255.743055555555566.791666666667-311.048611111111126.256944444445
8345714.145833333333569145.145833333333-369.145833333333
9625661.30787037037568.37592.9328703703704-36.3078703703702
10654575.030092592592569.2916666666675.738425925925978.9699074074075
11606598.261574074074572.91666666666725.34490740740737.73842592592598
12510580.914351851852561.29166666666719.6226851851852-70.9143518518518
13614562.64583333333354913.645833333333451.3541666666667
14647662.020833333333560.166666666667101.854166666667-15.0208333333334
15580573.502314814815577.75-4.247685185185186.49768518518522
16614591.053240740741581.2916666666679.7615740740740622.9467592592592
17636700.164351851852580.875119.289351851852-64.1643518518518
18388369.210648148148587.25-218.03935185185218.7893518518520
19356280.034722222222591.083333333333-311.04861111111175.9652777777777
20639737.0625591.916666666667145.145833333333-98.0625000000001
21753685.68287037037592.7592.932870370370467.3171296296297
22611597.530092592593591.7916666666675.738425925925913.4699074074074
23639619.219907407407593.87525.344907407407319.7800925925926
24630616.747685185185597.12519.622685185185213.2523148148148
25586610.104166666667596.45833333333313.6458333333334-24.1041666666667
26695701.0625599.208333333333101.854166666667-6.06249999999989
27552597.127314814815601.375-4.24768518518518-45.1273148148147
28619609.886574074074600.1259.761574074074069.11342592592598
29681720.956018518518601.666666666667119.289351851852-39.9560185185185
30421382.877314814815600.916666666667-218.03935185185238.1226851851852
31307291.659722222222602.708333333333-311.04861111111115.3402777777778
32754750.395833333333605.25145.1458333333333.60416666666674
33690701.141203703704608.20833333333392.9328703703704-11.1412037037037
34644617.696759259259611.9583333333335.738425925925926.3032407407409
35643640.011574074074614.66666666666725.34490740740732.98842592592587
36608638.62268518518561919.6226851851852-30.6226851851853
37651636.145833333333622.513.645833333333414.8541666666666
38691727.645833333333625.791666666667101.854166666667-36.6458333333333
39627624.918981481481629.166666666667-4.247685185185182.08101851851859
40634638.011574074074628.259.76157407407406-4.01157407407402
41731748.664351851852629.375119.289351851852-17.6643518518517
42475415.502314814815633.541666666667-218.03935185185259.4976851851852
43337325.159722222222636.208333333333-311.04861111111111.8402777777778
44803788.8125643.666666666667145.14583333333314.1875000000001
45722744.266203703704651.33333333333392.9328703703704-22.2662037037036
46590660.071759259259654.3333333333335.7384259259259-70.0717592592592
47724682.844907407408657.525.344907407407341.1550925925925
48627676.747685185185657.12519.6226851851852-49.7476851851851
49696668.770833333333655.12513.645833333333427.2291666666667
50825759.104166666667657.25101.85416666666765.8958333333335
51677654.793981481481659.041666666667-4.2476851851851822.2060185185186
52656673.511574074074663.759.76157407407406-17.5115740740741
53785783.997685185185664.708333333333119.2893518518521.00231481481489
54412446.043981481481664.083333333333-218.039351851852-34.0439814814814
55352353.451388888889664.5-311.048611111111-1.4513888888888
56839804.604166666667659.458333333333145.14583333333334.3958333333335
57729748.016203703704655.08333333333392.9328703703704-19.0162037037036
58696661.780092592593656.0416666666675.738425925925934.2199074074074
59641686.969907407408661.62525.3449074074073-45.9699074074075
60695684.372685185185664.7519.622685185185210.6273148148149
61638679.270833333333665.62513.6458333333334-41.2708333333334
62762767.479166666667665.625101.854166666667-5.47916666666674
63635659.002314814815663.25-4.24768518518518-24.0023148148148
64721667.303240740741657.5416666666679.7615740740740653.6967592592595
65854774.331018518518655.041666666667119.28935185185279.6689814814815
66418440.335648148148658.375-218.039351851852-22.3356481481480
67367351.409722222222662.458333333333-311.04861111111115.5902777777778
68824806.520833333333661.375145.14583333333317.4791666666667
69687749.30787037037656.37592.9328703703704-62.3078703703703
70601660.7384259259266555.7384259259259-59.7384259259259
71676675.55324074074650.20833333333325.34490740740730.446759259259238
72740663.372685185185643.7519.622685185185276.6273148148149
73691654.5625640.91666666666713.645833333333436.4375000000001
74683736.354166666667634.5101.854166666667-53.3541666666666
75594626.502314814815630.75-4.24768518518518-32.5023148148148
76729644.011574074074634.259.7615740740740684.988425925926
77731754.914351851852635.625119.289351851852-23.9143518518518
78386412.543981481482630.583333333333-218.039351851852-26.5439814814815
79331313.451388888889624.5-311.04861111111117.5486111111112
80706769.104166666667623.958333333333145.145833333333-63.1041666666667
81715720.849537037037627.91666666666792.9328703703704-5.84953703703695
82657632.113425925926626.3755.738425925925924.8865740740742
83653647.678240740741622.33333333333325.34490740740735.32175925925924
84642642.206018518519622.58333333333319.6226851851852-0.206018518518704
85643637.020833333333623.37513.64583333333345.97916666666663
86718729.354166666667627.5101.854166666667-11.3541666666666
87654632.543981481481636.791666666667-4.2476851851851821.4560185185187
88632651.92824074074642.1666666666679.76157407407406-19.9282407407406
89731760.122685185185640.833333333333119.289351851852-29.1226851851852
90392423.585648148148641.625-218.039351851852-31.5856481481483
91344331.284722222222642.333333333333-311.04861111111112.7152777777777
92792786.270833333333641.125145.1458333333335.72916666666663
93852736.474537037037643.54166666666792.9328703703704115.525462962963
94649651.696759259259645.9583333333335.7384259259259-2.69675925925912
95629678.886574074074653.54166666666725.3449074074073-49.886574074074
96685686.664351851852667.04166666666719.6226851851852-1.66435185185185
97617687.020833333333673.37513.6458333333334-70.0208333333334
98715780.979166666667679.125101.854166666667-65.9791666666666
99715679.085648148148683.333333333333-4.2476851851851835.9143518518518
100629694.553240740741684.7916666666679.76157407407406-65.5532407407406
101916816.081018518518696.791666666667119.28935185185299.9189814814815
102531492.043981481481710.083333333333-218.03935185185238.9560185185186
103357409.784722222222720.833333333333-311.048611111111-52.7847222222223
104917885.104166666667739.958333333333145.14583333333331.8958333333334
105828848.099537037037755.16666666666792.9328703703704-20.0995370370370
106708768.363425925926762.6255.7384259259259-60.3634259259259
107858791.92824074074766.58333333333325.344907407407366.0717592592594
108775785.831018518518766.20833333333319.6226851851852-10.8310185185184
109785781.145833333333767.513.64583333333343.85416666666674
1101006873.6875771.833333333333101.854166666667132.3125
111789771.210648148148775.458333333333-4.2476851851851817.7893518518518
112734793.42824074074783.6666666666679.76157407407406-59.4282407407406
113906907.456018518518788.166666666667119.289351851852-1.45601851851848
114532568.543981481481786.583333333333-218.039351851852-36.5439814814814
115387477.451388888889788.5-311.048611111111-90.4513888888888
116991932.8125787.666666666667145.14583333333358.1875000000001
117841878.849537037037785.91666666666792.9328703703704-37.8495370370370
118892793.69675925926787.9583333333335.738425925925998.3032407407408
119782817.594907407408792.2525.3449074074073-35.5949074074075
120813816.122685185185796.519.6226851851852-3.12268518518522
121793NA801.208333333333NANA
122978NA804.625NANA
123775NA807.041666666667NANA
124797NA804.125NANA
125946NANANANA
126594NANANANA
127438NANANANA
1281022NANANANA
129868NANANANA
130795NANANANA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/28/t12935359241iwk24rb26t4hek/1lgwx1293535876.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/28/t12935359241iwk24rb26t4hek/1lgwx1293535876.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/28/t12935359241iwk24rb26t4hek/2lgwx1293535876.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/28/t12935359241iwk24rb26t4hek/2lgwx1293535876.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/28/t12935359241iwk24rb26t4hek/3w7di1293535876.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/28/t12935359241iwk24rb26t4hek/3w7di1293535876.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/28/t12935359241iwk24rb26t4hek/4w7di1293535876.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/28/t12935359241iwk24rb26t4hek/4w7di1293535876.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