Home » date » 2010 » Dec » 29 »

*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: Wed, 29 Dec 2010 09:06:27 +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/29/t1293613462i24naz0b8lnxi8x.htm/, Retrieved Wed, 29 Dec 2010 10:04:27 +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/29/t1293613462i24naz0b8lnxi8x.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 «
1775 2197 2920 4240 5415 6136 6719 6234 7152 3646 2165 2803 1615 2350 3350 3536 5834 6767 5993 7276 5641 3477 2247 2466 1567 2237 2598 3729 5715 5776 5852 6878 5488 3583 2054 2282 1552 2261 2446 3519 5161 5085 5711 6057 5224 3363 1899 2115 1491 2061 2419 3430 4778 4862 6176 5664 5529 3418 1941 2402 1579 2146 2462 3695 4831 5134 6250 5760 6249 2917 1741 2359 1511 2059 2635 2867 4403 5720 4502 5749 5627 2846 1762 2429 1169 2154 2249 2687 4359 5382 4459 6398 4596 3024 1887 2070 1351 2218 2461 3028 4784 4975 4607 6249 4809 3157 1910 2228 1594 2467 2222 3607 4685 4962 5770 5480 5000 3228 1993 2288 1588 2105 2191 3591 4668 4885 5822 5599 5340 3082 2010 2301
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time7 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
11775NANA-2223.59236111111NA
22197NANA-1513.10902777778NA
32920NANA-1205.41319444444NA
44240NANA-329.913194444444NA
55415NANA1225.98263888889NA
66136NANA1661.72013888889NA
767196122.024305555554276.833333333331845.19097222222596.975694444444
862346693.495138888894276.541666666672416.95347222222-459.495138888889
971526078.207638888894300.833333333331777.374305555561073.79236111111
1036463806.932638888894289.41666666667-482.484027777778-160.932638888889
1121652494.874305555564277.54166666667-1782.66736111111-329.874305555555
1228032931.249305555564321.29166666667-1390.04236111111-128.249305555555
1316152093.740972222224317.33333333333-2223.59236111111-478.740972222222
1423502817.390972222224330.5-1513.10902777778-467.390972222222
1533503105.545138888894310.95833333333-1205.41319444444244.454861111111
1635363911.045138888894240.95833333333-329.913194444444-375.045138888889
1758345463.315972222224237.333333333331225.98263888889370.684027777779
1867675888.428472222224226.708333333331661.72013888889878.571527777778
1959936055.857638888894210.666666666671845.19097222222-62.8576388888887
2072766620.911805555564203.958333333332416.95347222222655.088194444445
2156415945.290972222224167.916666666671777.37430555556-304.290972222222
2234773662.140972222224144.625-482.484027777778-185.140972222222
2322472365.040972222224147.70833333333-1782.66736111111-118.040972222222
2424662711.415972222224101.45833333333-1390.04236111111-245.415972222222
2515671830.699305555564054.29166666667-2223.59236111111-263.699305555555
2622372518.724305555564031.83333333333-1513.10902777778-281.724305555555
2725982803.461805555554008.875-1205.41319444444-205.461805555555
2837293677.003472222224006.91666666667-329.91319444444451.9965277777778
2957155229.274305555564003.291666666671225.98263888889485.725694444445
3057765649.303472222223987.583333333331661.72013888889126.696527777778
3158525824.482638888893979.291666666671845.1909722222227.5173611111118
3268786396.620138888893979.666666666672416.95347222222481.379861111112
3354885751.707638888893974.333333333331777.37430555556-263.707638888889
3435833476.765972222223959.25-482.484027777778106.234027777778
3520542144.749305555563927.41666666667-1782.66736111111-90.7493055555556
3622822485.499305555563875.54166666667-1390.04236111111-203.499305555556
3715521617.282638888893840.875-2223.59236111111-65.2826388888889
3822612287.682638888893800.79166666667-1513.10902777778-26.6826388888885
3924462550.170138888893755.58333333333-1205.41319444444-104.170138888889
4035193405.503472222223735.41666666667-329.913194444444113.496527777778
4151614945.774305555563719.791666666671225.98263888889215.225694444444
4250855368.095138888893706.3751661.72013888889-283.095138888889
4357115542.065972222223696.8751845.19097222222168.934027777778
4460576102.9534722222236862416.95347222222-45.9534722222224
4552245453.915972222223676.541666666671777.37430555556-229.915972222222
4633633189.224305555563671.70833333333-482.484027777778173.775694444445
4718991869.374305555553652.04166666667-1782.6673611111129.6256944444449
4821152236.749305555563626.79166666667-1390.04236111111-121.749305555556
4914911413.282638888893636.875-2223.5923611111177.7173611111111
5020612126.765972222223639.875-1513.10902777778-65.765972222222
5124192430.795138888893636.20833333333-1205.41319444444-11.7951388888887
5234303321.295138888893651.20833333333-329.913194444444108.704861111111
5347784881.232638888893655.251225.98263888889-103.232638888889
5448625330.678472222223668.958333333331661.72013888889-468.678472222222
5561765529.774305555553684.583333333331845.19097222222646.225694444444
5656646108.745138888893691.791666666672416.95347222222-444.745138888889
5755295474.499305555563697.1251777.3743055555654.5006944444449
5834183227.474305555553709.95833333333-482.484027777778190.525694444445
5919411940.540972222223723.20833333333-1782.667361111110.459027777777919
6024022346.707638888893736.75-1390.0423611111155.292361111111
6115791527.574305555563751.16666666667-2223.5923611111151.4256944444442
6221462245.140972222223758.25-1513.10902777778-99.140972222222
6324622586.836805555563792.25-1205.41319444444-124.836805555556
6436953471.461805555563801.375-329.913194444444223.538194444445
6548314998.149305555563772.166666666671225.98263888889-167.149305555555
6651345423.761805555563762.041666666671661.72013888889-289.761805555556
6762505602.607638888893757.416666666671845.19097222222647.392361111111
6857606167.911805555563750.958333333332416.95347222222-407.911805555555
6962495531.915972222223754.541666666671777.37430555556717.084027777778
7029173244.765972222223727.25-482.484027777778-327.765972222223
7117411892.249305555553674.91666666667-1782.66736111111-151.249305555555
7223592291.457638888893681.5-1390.0423611111167.5423611111114
7315111409.490972222223633.08333333333-2223.59236111111101.509027777778
7420592046.682638888893559.79166666667-1513.1090277777812.3173611111110
7526352328.003472222223533.41666666667-1205.41319444444306.996527777777
7628673174.628472222223504.54166666667-329.913194444444-307.628472222222
7744034728.440972222223502.458333333331225.98263888889-325.440972222222
7857205167.970138888893506.251661.72013888889552.029861111112
7945025340.107638888893494.916666666671845.19097222222-838.107638888889
8057495901.578472222223484.6252416.95347222222-152.578472222222
8156275249.874305555563472.51777.37430555556377.125694444445
8228462966.432638888893448.91666666667-482.484027777778-120.432638888889
8317621656.915972222223439.58333333333-1782.66736111111105.084027777778
8424292033.624305555563423.66666666667-1390.04236111111395.375694444444
8511691184.199305555563407.79166666667-2223.59236111111-15.1993055555558
8621541919.932638888893433.04166666667-1513.10902777778234.067361111112
8722492211.711805555553417.125-1205.4131944444437.2881944444448
8826873051.670138888893381.58333333333-329.913194444444-364.670138888889
8943594620.190972222223394.208333333331225.98263888889-261.190972222221
9053825046.178472222223384.458333333331661.72013888889335.821527777778
9144595222.274305555553377.083333333331845.19097222222-763.274305555555
9263985804.286805555563387.333333333332416.95347222222593.713194444445
9345965176.207638888893398.833333333331777.37430555556-580.207638888889
9430242939.390972222223421.875-482.48402777777884.6090277777776
9518871671.124305555563453.79166666667-1782.66736111111215.875694444444
9620702064.499305555563454.54166666667-1390.042361111115.50069444444489
9713511220.157638888893443.75-2223.59236111111130.842361111112
9822181930.599305555563443.70833333333-1513.10902777778287.400694444445
9924612240.961805555563446.375-1205.41319444444220.038194444444
10030283130.878472222223460.79166666667-329.913194444444-102.878472222223
10147844693.274305555563467.291666666671225.9826388888990.7256944444443
10249755136.553472222223474.833333333331661.72013888889-161.553472222223
10346075336.732638888893491.541666666671845.19097222222-729.732638888889
10462495928.995138888893512.041666666672416.95347222222320.004861111111
10548095289.832638888893512.458333333331777.37430555556-480.832638888889
10631573044.140972222223526.625-482.484027777778112.859027777778
10719101763.957638888893546.625-1782.66736111111146.042361111111
10822282151.915972222223541.95833333333-1390.0423611111176.084027777778
10915941366.282638888893589.875-2223.59236111111227.717361111111
11024672093.182638888893606.29166666667-1513.10902777778373.817361111111
11122222376.795138888893582.20833333333-1205.41319444444-154.795138888889
11236073263.211805555563593.125-329.913194444444343.788194444445
11346854825.524305555563599.541666666671225.98263888889-140.524305555555
11449625267.220138888893605.51661.72013888889-305.220138888889
11557705452.940972222223607.751845.19097222222317.059027777778
11654806009.370138888893592.416666666672416.95347222222-529.370138888888
11750005353.415972222223576.041666666671777.37430555556-353.415972222222
11832283091.599305555563574.08333333333-482.484027777778136.400694444445
11919931790.040972222223572.70833333333-1782.66736111111202.959027777777
12022882178.749305555563568.79166666667-1390.04236111111109.250694444444
12115881344.157638888893567.75-2223.59236111111243.842361111112
12221052061.765972222223574.875-1513.1090277777843.234027777778
12321912388.586805555563594-1205.41319444444-197.586805555556
12435913272.170138888893602.08333333333-329.913194444444318.829861111111
12546684822.690972222223596.708333333331225.98263888889-154.690972222222
12648855259.678472222223597.958333333331661.72013888889-374.678472222222
1275822NANA1845.19097222222NA
1285599NANA2416.95347222222NA
1295340NANA1777.37430555556NA
1303082NANA-482.484027777778NA
1312010NANA-1782.66736111111NA
1322301NANA-1390.04236111111NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293613462i24naz0b8lnxi8x/1qeke1293613579.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293613462i24naz0b8lnxi8x/1qeke1293613579.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t1293613462i24naz0b8lnxi8x/2qeke1293613579.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293613462i24naz0b8lnxi8x/2qeke1293613579.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t1293613462i24naz0b8lnxi8x/30njh1293613579.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293613462i24naz0b8lnxi8x/30njh1293613579.ps (open in new window)


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