Home » date » 2010 » Jan » 13 »

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Wed, 13 Jan 2010 12:17:04 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Jan/13/t12634104089zzrf57zuq5rjms.htm/, Retrieved Wed, 13 Jan 2010 20:20:13 +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/Jan/13/t12634104089zzrf57zuq5rjms.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 «
8,82000 8,80000 8,82000 8,58000 8,54000 8,42000 8,43000 8,44000 8,09000 7,69000 7,56000 7,54000 7,40000 7,39000 7,37000 7,31000 7,35000 7,26000 7,37000 7,35000 7,33000 7,32000 7,31000 7,33000 7,32000 7,27000 7,48000 7,70000 7,77000 7,80000 7,84000 7,81000 7,78000 7,82000 7,80000 7,81000 7,80000 7,66000 7,41000 7,35000 7,39000 7,32000 7,32000 7,30000 7,29000 7,26000 7,22000 7,21000 7,21000 7,21000 7,20000 7,19000 7,18000 7,12000 7,12000 7,07000 7,08000 7,05000 7,06000 7,07000 7,08000 7,08000 7,09000 7,07000 7,06000 6,99000 6,99000 6,99000 6,98000 6,96000 6,95000 6,91000 6,91000 6,87000 6,91000 6,89000 6,88000 6,90000 6,91000 6,85000 6,86000 6,82000 6,80000 6,83000 6,84000 6,89000 7,14000 7,21000 7,25000 7,31000 7,30000 7,48000 7,49000 7,40000 7,44000 7,42000 7,14000 7,24000 7,33000 7,61000 7,66000 7,69000 7,70000 7,68000 7,71000 7,71000 7,72000 7,68000 7,72000 7,74000 7,76000 7,90000 7,97000 7,96000 etc...
 
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'Gwilym Jenkins' @ 72.249.127.135


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
18.82NANA-0.0696631944444442NA
28.8NANA-0.0743715277777778NA
38.82NANA-0.0387465277777779NA
48.58NANA0.0158368055555555NA
58.54NANA0.0514201388888887NA
68.42NANA0.0412118055555555NA
78.438.309420138888898.251666666666670.0577534722222220.120579861111111
88.448.199461805555558.133750.06571180555555550.240538194444445
98.098.047128472222228.014583333333330.03254513888888910.0428715277777787
107.697.887461805555567.90125-0.0137881944444444-0.197461805555555
117.567.768753472222227.79875-0.0299965277777780-0.208753472222221
127.547.662920138888897.70083333333333-0.0379131944444441-0.122920138888888
137.47.538670138888897.60833333333333-0.0696631944444442-0.138670138888888
147.397.444378472222227.51875-0.0743715277777778-0.0543784722222211
157.377.402920138888897.44166666666667-0.0387465277777779-0.0329201388888878
167.317.410420138888897.394583333333330.0158368055555555-0.100420138888889
177.357.420170138888897.368750.0514201388888887-0.0701701388888898
187.267.390795138888897.349583333333330.0412118055555555-0.130795138888889
197.377.395253472222227.33750.057753472222222-0.0252534722222224
207.357.394878472222227.329166666666670.0657118055555555-0.0448784722222229
217.337.361295138888897.328750.0325451388888891-0.031295138888888
227.327.335795138888897.34958333333333-0.0137881944444444-0.0157951388888877
237.317.353336805555567.38333333333333-0.0299965277777780-0.0433368055555574
247.337.385420138888897.42333333333333-0.0379131944444441-0.0554201388888895
257.327.395753472222227.46541666666667-0.0696631944444442-0.0757534722222211
267.277.429795138888897.50416666666667-0.0743715277777778-0.159795138888889
277.487.503336805555567.54208333333333-0.0387465277777779-0.0233368055555561
287.77.597503472222227.581666666666670.01583680555555550.102496527777779
297.777.674336805555567.622916666666670.05142013888888870.0956631944444437
307.87.704545138888897.663333333333330.04121180555555550.0954548611111115
317.847.761086805555567.703333333333330.0577534722222220.0789131944444446
327.817.805295138888897.739583333333330.06571180555555550.00470486111111157
337.787.785461805555557.752916666666660.0325451388888891-0.0054618055555542
347.827.721628472222227.73541666666667-0.01378819444444440.098371527777779
357.87.675003472222227.705-0.02999652777777800.124996527777777
367.817.631253472222227.66916666666666-0.03791319444444410.178746527777779
377.87.557836805555567.6275-0.06966319444444420.242163194444444
387.667.510211805555557.58458333333333-0.07437152777777780.149788194444445
397.417.504170138888897.54291666666667-0.0387465277777779-0.094170138888888
407.357.515003472222227.499166666666670.0158368055555555-0.165003472222222
417.397.503086805555557.451666666666670.0514201388888887-0.113086805555555
427.327.443711805555557.40250.0412118055555555-0.123711805555554
437.327.410670138888897.352916666666670.057753472222222-0.090670138888889
447.37.375295138888897.309583333333330.0657118055555555-0.0752951388888885
457.297.314628472222227.282083333333330.0325451388888891-0.024628472222223
467.267.252878472222227.26666666666667-0.01378819444444440.00712152777777675
477.227.221253472222227.25125-0.0299965277777780-0.00125347222222150
487.217.196253472222227.23416666666667-0.03791319444444410.0137465277777773
497.217.147836805555557.2175-0.06966319444444420.0621631944444454
507.217.125211805555557.19958333333333-0.07437152777777780.084788194444446
517.27.142503472222227.18125-0.03874652777777790.0574965277777784
527.197.179586805555557.163750.01583680555555550.0104131944444461
537.187.199753472222227.148333333333330.0514201388888887-0.019753472222221
547.127.177045138888897.135833333333330.0412118055555555-0.0570451388888875
557.127.182336805555557.124583333333330.057753472222222-0.0623368055555549
567.077.179461805555567.113750.0657118055555555-0.109461805555555
577.087.136295138888897.103750.0325451388888891-0.0562951388888884
587.057.080378472222227.09416666666667-0.0137881944444444-0.030378472222222
597.067.054170138888897.08416666666667-0.02999652777777800.00582986111111072
607.077.035836805555557.07375-0.03791319444444410.0341631944444458
617.086.993253472222227.06291666666667-0.06966319444444420.0867465277777786
627.086.979795138888897.05416666666667-0.07437152777777780.100204861111113
637.097.007920138888897.04666666666667-0.03874652777777790.0820798611111124
647.077.054586805555567.038750.01583680555555550.0154131944444451
657.067.081836805555557.030416666666670.0514201388888887-0.0218368055555551
666.997.060378472222227.019166666666670.0412118055555555-0.0703784722222212
676.997.063170138888897.005416666666670.057753472222222-0.0731701388888872
686.997.055295138888896.989583333333330.0657118055555555-0.0652951388888878
696.987.005878472222226.973333333333330.0325451388888891-0.0258784722222218
706.966.944545138888896.95833333333333-0.01378819444444440.0154548611111123
716.956.913336805555556.94333333333333-0.02999652777777800.0366631944444453
726.916.894170138888896.93208333333333-0.03791319444444410.0158298611111114
736.916.855336805555566.925-0.06966319444444420.0546631944444451
746.876.841461805555566.91583333333333-0.07437152777777780.0285381944444447
756.916.866253472222226.905-0.03874652777777790.0437465277777767
766.896.910003472222226.894166666666670.0158368055555555-0.0200034722222231
776.886.933503472222226.882083333333330.0514201388888887-0.0535034722222232
786.96.913711805555566.87250.0412118055555555-0.0137118055555554
796.916.924003472222226.866250.057753472222222-0.0140034722222220
806.856.929878472222226.864166666666670.0657118055555555-0.079878472222223
816.866.907128472222226.874583333333330.0325451388888891-0.0471284722222229
826.826.883711805555556.8975-0.0137881944444444-0.0637118055555543
836.86.896253472222226.92625-0.0299965277777780-0.0962534722222221
846.836.920836805555556.95875-0.0379131944444441-0.0908368055555542
856.846.922420138888896.99208333333333-0.0696631944444442-0.0824201388888888
866.896.960211805555557.03458333333333-0.0743715277777778-0.0702118055555552
877.147.048336805555567.08708333333333-0.03874652777777790.0916631944444442
887.217.153336805555567.13750.01583680555555550.056663194444444
897.257.239753472222227.188333333333330.05142013888888870.0102465277777775
907.317.280795138888897.239583333333330.04121180555555550.0292048611111113
917.37.334420138888897.276666666666670.057753472222222-0.0344201388888887
927.487.369461805555567.303750.06571180555555550.110538194444445
937.497.358795138888897.326250.03254513888888910.131204861111110
947.47.337045138888897.35083333333333-0.01378819444444440.0629548611111108
957.447.354586805555557.38458333333333-0.02999652777777800.0854131944444454
967.427.379586805555557.4175-0.03791319444444410.0404131944444455
977.147.380336805555567.45-0.0696631944444442-0.240336805555556
987.247.400628472222227.475-0.0743715277777778-0.160628472222221
997.337.453753472222227.4925-0.0387465277777779-0.123753472222222
1007.617.530420138888897.514583333333330.01583680555555550.0795798611111111
1017.667.590586805555557.539166666666670.05142013888888870.0694131944444454
1027.697.602878472222227.561666666666670.04121180555555550.0871215277777795
1037.77.654420138888897.596666666666670.0577534722222220.0455798611111113
1047.687.707378472222227.641666666666670.0657118055555555-0.0273784722222228
1057.717.712961805555567.680416666666670.0325451388888891-0.00296180555555559
1067.717.696628472222227.71041666666667-0.01378819444444440.0133715277777773
1077.727.705420138888897.73541666666667-0.02999652777777800.0145798611111108
1087.687.721670138888897.75958333333333-0.0379131944444441-0.0416701388888887
1097.727.711586805555567.78125-0.06966319444444420.00841319444444366
1107.747.729378472222227.80375-0.07437152777777780.0106215277777784
1117.767.786253472222227.825-0.0387465277777779-0.0262534722222219
1127.97.861670138888897.845833333333330.01583680555555550.0383298611111114
1137.977.918920138888897.86750.05142013888888870.0510798611111118
1147.967.928711805555567.88750.04121180555555550.0312881944444445
1157.957.965670138888897.907916666666670.057753472222222-0.015670138888888
1167.977.994045138888897.928333333333330.0657118055555555-0.0240451388888880
1177.937.980878472222227.948333333333330.0325451388888891-0.0508784722222222
1187.997.950378472222227.96416666666667-0.01378819444444440.0396215277777792
1197.967.948336805555557.97833333333333-0.02999652777777800.0116631944444450
1207.927.962503472222228.00041666666667-0.0379131944444441-0.0425034722222222
1217.977.957420138888898.02708333333333-0.06966319444444420.0125798611111101
1227.987.979378472222228.05375-0.07437152777777780.000621527777777686
12388.045003472222228.08375-0.0387465277777779-0.0450034722222217
1248.048.127920138888898.112083333333330.0158368055555555-0.0879201388888884
1258.178.188503472222228.137083333333330.0514201388888887-0.0185034722222213
1268.298.207878472222228.166666666666670.04121180555555550.0821215277777778
1278.26NANA0.057753472222222NA
1288.3NANA0.0657118055555555NA
1298.32NANA0.0325451388888891NA
1308.28NANA-0.0137881944444444NA
1318.27NANA-0.0299965277777780NA
1328.32NANA-0.0379131944444441NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jan/13/t12634104089zzrf57zuq5rjms/18tsj1263410221.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/13/t12634104089zzrf57zuq5rjms/18tsj1263410221.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/13/t12634104089zzrf57zuq5rjms/2imyc1263410221.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/13/t12634104089zzrf57zuq5rjms/2imyc1263410221.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/13/t12634104089zzrf57zuq5rjms/31xlb1263410221.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/13/t12634104089zzrf57zuq5rjms/31xlb1263410221.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/13/t12634104089zzrf57zuq5rjms/4b38m1263410221.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/13/t12634104089zzrf57zuq5rjms/4b38m1263410221.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