Home » date » 2011 » May » 29 »

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Sun, 29 May 2011 11:22:47 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2011/May/29/t1306668047a64gvijsoiba78k.htm/, Retrieved Sun, 29 May 2011 13:20:52 +0200
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
KDGP2W92
 
Dataseries X:
» Textbox « » Textfile « » CSV «
505,7 55,7 735,7 575,9 545,8 905,8 765,8 945,7 15,7 645,7 155,9 416 825,8 725,9 925,9 556 116,1 876,3 336,2 186,1 286,1 26 915,8 405,7 965,7 395,6 425,8 545,6 65,6 445,6 895,5 175,4 715,4 865,5 57,4 145,4 315,3 635,4 5,2 515,2 515,1 955 955 634,9 205 275 425 84,9 534,7 4,8 704,7 684,7 884,6 994,6 294,7 524,7 914,5 564,4 984,5 934,4 514,6 474,5 784,4 504,5 824,4 414,6 964,7 64,6 244,7 344,7 34,7 685 425 484,8 785,1 704,9 245,4 285,6 218,8 706,1 856,2 456,6 606,8 527,3 657,8 948,2 486,6 238,9 289,4 969,5 589,5 189,7 639,8 9710,1 969,9 939,9 859,7 679,9 879,9 329,8 349,6 39,5 849,5 449,6 749,6 249,7 649,8 619,4 939 778,9
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Herman Ole Andreas Wold' @ www.yougetit.org


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1505.7NANA5.61401909722219NA
255.7NANA-85.9255642361111NA
3735.7NANA-6.10160590277779NA
4575.9NANA-122.611501736111NA
5545.8NANA-221.796397569444NA
6905.8NANA-14.1156684027778NA
7765.8535.422873263889535.7875-0.364626736111109230.377126736111
8945.7304.219748263889577.05-272.830251736111641.480251736111
915.7556.821310763889612.9-56.0786892361111-541.121310763889
10645.71630.23953993056619.9958333333331010.24370659722-984.539539930556
11155.9459.711935763889601.2625-141.550564236111-303.811935763889
12416487.646310763889582.129166666667-94.4828559027778-71.646310763889
13825.8568.6140190972225635.61401909722219257.185980902778
14725.9427.524435763889513.45-85.9255642361111298.375564236111
15925.9486.965060763889493.066666666667-6.10160590277779438.934939236111
16556355.900998263889478.5125-122.611501736111200.099001736111
17116.1262.557769097222484.354166666667-221.796397569444-146.457769097222
18876.3501.471831597222515.5875-14.1156684027778374.828168402778
19336.2520.622873263889520.9875-0.364626736111109-184.422873263889
20186.1240.223914930555513.054166666667-272.830251736111-54.1239149305554
21286.1422.375477430555478.454166666667-56.0786892361111-136.275477430555
22261467.42703993056457.1833333333331010.24370659722-1441.42703993056
23915.8313.095269097222454.645833333333-141.550564236111602.704730902778
24405.7340.112977430555434.595833333333-94.482855902777865.5870225694445
25965.7445.568185763889439.9541666666675.61401909722219520.131814236111
26395.6376.886935763889462.8125-85.925564236111118.7130642361111
27425.8474.152560763889480.254166666667-6.10160590277779-48.352560763889
28545.6410.509331597222533.120833333333-122.611501736111135.090668402778
2965.6310.536935763889532.333333333333-221.796397569444-244.936935763889
30445.6471.605164930556485.720833333333-14.1156684027778-26.0051649305556
31895.5447.410373263889447.775-0.364626736111109448.089626736111
32175.4157.836414930556430.666666666667-272.83025173611117.5635850694445
33715.4367.054644097222423.133333333333-56.0786892361111348.345355902778
34865.51414.58537326389404.3416666666671010.24370659722-549.085373263889
3557.4280.253602430556421.804166666667-141.550564236111-222.853602430556
36145.4367.275477430556461.758333333333-94.4828559027778-221.875477430556
37315.3491.076519097222485.46255.61401909722219-175.776519097222
38635.4421.161935763889507.0875-85.9255642361111214.238064236111
395.2498.865060763889504.966666666667-6.10160590277779-493.665060763889
40515.2336.484331597222459.095833333333-122.611501736111178.715668402778
41515.1228.011935763889449.808333333333-221.796397569444287.088064236111
42955448.488498263889462.604166666667-14.1156684027778506.511501736111
43955468.860373263889469.225-0.364626736111109486.139626736111
44634.9179.261414930556452.091666666667-272.830251736111455.638585069444
45205398.883810763889454.9625-56.0786892361111-193.883810763889
462751501.41453993056491.1708333333331010.24370659722-1226.41453993056
47425372.078602430556513.629166666667-141.55056423611152.9213975694445
4884.9436.192144097222530.675-94.4828559027778-351.292144097222
49534.7510.426519097222504.81255.6140190972221924.2734809027777
504.8386.782769097222472.708333333333-85.9255642361111-381.982769097222
51704.7491.577560763889497.679166666667-6.10160590277779213.122439236111
52684.7416.688498263889539.3-122.611501736111268.011501736111
53884.6352.874435763889574.670833333333-221.796397569444531.725564236111
54994.6619.263498263889633.379166666667-14.1156684027778375.336501736111
55294.7667.572873263889667.9375-0.364626736111109-372.872873263889
56524.7413.840581597222686.670833333333-272.830251736111110.859418402778
57914.5653.483810763889709.5625-56.0786892361111261.016189236111
58564.41715.61870659722705.3751010.24370659722-1151.21870659722
59984.5553.807769097222695.358333333333-141.550564236111430.692230902778
60934.4574.200477430556668.683333333333-94.4828559027778360.199522569444
61514.6678.047352430556672.4333333333335.61401909722219-163.447352430556
62474.5595.253602430555681.179166666667-85.9255642361111-120.753602430555
63784.4627.998394097222634.1-6.10160590277779156.401605902778
64504.5474.425998263889597.0375-122.61150173611130.0740017361111
65824.4326.511935763889548.308333333333-221.796397569444497.888064236111
66414.6484.225998263889498.341666666667-14.1156684027778-69.6259982638889
67964.7483.852039930556484.216666666667-0.364626736111109480.847960069444
6864.6208.082248263889480.9125-272.830251736111-143.482248263889
69244.7425.292144097222481.370833333333-56.0786892361111-180.592144097222
70344.71499.99370659722489.751010.24370659722-1155.29370659722
7134.7332.424435763889473.975-141.550564236111-297.724435763889
72685349.992144097222444.475-94.4828559027778335.007855902778
73425413.634852430555408.0208333333335.6140190972221911.3651475694445
74484.8317.745269097222403.670833333333-85.9255642361111167.054730902778
75785.1449.777560763889455.879166666667-6.10160590277779335.322439236111
76704.9363.409331597222486.020833333333-122.611501736111341.490668402778
77245.4292.724435763889514.520833333333-221.796397569444-47.3244357638889
78285.6517.671831597222531.7875-14.1156684027778-232.071831597222
79218.8534.552039930556534.916666666667-0.364626736111109-315.752039930556
80706.1291.094748263889563.925-272.830251736111415.005251736111
81856.2514.717144097222570.795833333333-56.0786892361111341.482855902778
82456.61549.18537326389538.9416666666671010.24370659722-1092.58537326389
83606.8379.807769097222521.358333333333-141.550564236111226.992230902778
84527.3457.204644097222551.6875-94.482855902777870.0953559027778
85657.8601.243185763889595.6291666666675.6140190972221956.556814236111
86948.2503.632769097222589.558333333333-85.9255642361111444.567230902778
87486.6552.923394097222559.025-6.10160590277779-66.323394097222
88238.9812.959331597222935.570833333333-122.611501736111-574.059331597222
89289.41114.466102430561336.2625-221.796397569444-825.066102430555
90969.51354.467664930561368.58333333333-14.1156684027778-384.967664930555
91589.51393.822873263891394.1875-0.364626736111109-804.322873263889
92189.71118.590581597221391.42083333333-272.830251736111-928.890581597222
93639.81340.550477430561396.62916666667-56.0786892361111-700.750477430556
949710.12427.047873263891416.804166666671010.243706597227283.05212673611
95969.91281.549435763891423.1-141.550564236111-311.649435763889
96939.91292.375477430561386.85833333333-94.4828559027778-352.475477430555
97859.71364.555685763891358.941666666675.61401909722219-504.855685763889
98679.91294.678602430561380.60416666667-85.9255642361111-614.778602430555
99879.91389.906727430561396.00833333333-6.10160590277779-510.006727430555
100329.8883.7884982638891006.4-122.611501736111-553.988498263889
101349.6377.082769097222598.879166666667-221.796397569444-27.4827690972222
10239.5558.071831597222572.1875-14.1156684027778-518.571831597222
103849.5561.772873263889562.1375-0.364626736111109287.727126736111
104449.6296.736414930555569.566666666667-272.830251736111152.863585069445
105749.6NANA-56.0786892361111NA
106249.7NANA1010.24370659722NA
107649.8NANA-141.550564236111NA
108619.4NANA-94.4828559027778NA
109939NANANANA
110778.9NANANANA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/May/29/t1306668047a64gvijsoiba78k/1jato1306668165.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/29/t1306668047a64gvijsoiba78k/1jato1306668165.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/29/t1306668047a64gvijsoiba78k/25qvz1306668165.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/29/t1306668047a64gvijsoiba78k/25qvz1306668165.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/29/t1306668047a64gvijsoiba78k/32mjd1306668165.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/29/t1306668047a64gvijsoiba78k/32mjd1306668165.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/29/t1306668047a64gvijsoiba78k/4li451306668165.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/29/t1306668047a64gvijsoiba78k/4li451306668165.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