Home » date » 2010 » May » 28 »

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Fri, 28 May 2010 12:05:17 +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/May/28/t127504855399l8k5kd905s0m3.htm/, Retrieved Fri, 28 May 2010 14:09:18 +0200
 
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/May/28/t127504855399l8k5kd905s0m3.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 «
182900 191400 189300 192200 187900 193900 189100 193100 194800 200200 211500 202100 200300 199200 204900 207300 200000 197700 202200 200200 208300 215100 210700 208100 209000 211000 210200 205500 211400 211700 209300 207500 203300 207100 206900 228700 226900 226500 227100 228100 226500 225200 217800 221300 215300 231300 227100 237800 230200 233400 231100 237200 243700 239700 248400 241000 254500 242800 268300 253900 262100 264100 261000 269300 260400 263200 279200 272200 269200 289600 283200 284300 283000 289100 289600 289100 287400 279600 289300 295000 299600 293600 294400 290200 301000 307900 298800 310300 293900 305000 311300 317300 296200 306800 291800 301900 314600 321500 329400 311700 309700 306500 307100 301300 292200 310100 316800 284400 284600 301200 287600 314300 298200 299400 301900 265500 287100 274000 290100 263100 245200 258600 259800 269800 274600 274800 271100 257800 etc...
 
Output produced by software:


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


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1182900NANA-2491.59722222221NA
2191400NANA2457.15277777777NA
3189300NANA489.652777777761NA
4192200NANA4143.40277777779NA
5187900NANA-38.6805555555562NA
6193900NANA-951.180555555553NA
7189100195928.819444444194758.3333333331170.48611111112-6828.81944444444
8193100192319.236111111195808.333333333-3489.09722222220780.763888888876
9194800193330.486111111196783.333333333-3452.847222222211469.51388888888
10200200199002.569444444198062.5940.0694444444381197.43055555553
11211500202471.319444444199195.8333333333275.48611111119028.68055555559
12202100197805.486111111199858.333333333-2052.847222222234294.51388888891
13200300198070.902777778200562.5-2491.597222222212229.09722222225
14199200203861.319444444201404.1666666672457.15277777777-4661.31944444444
15204900202752.152777778202262.5489.6527777777612147.84722222228
16207300207589.236111111203445.8333333334143.40277777779-289.236111111066
172e+05203994.652777778204033.333333333-38.6805555555562-3994.65277777775
18197700203298.819444444204250-951.180555555553-5598.81944444444
19202200206032.986111111204862.51170.48611111112-3832.98611111112
20200200202227.569444444205716.666666667-3489.09722222220-2027.56944444447
21208300202976.319444444206429.166666667-3452.847222222215323.68055555556
22215100207515.069444444206575940.0694444444387584.93055555556
23210700210250.4861111112069753275.4861111111449.513888888876
24208100205980.486111111208033.333333333-2052.847222222232119.51388888891
25209000206420.902777778208912.5-2491.597222222212579.09722222222
26211000211969.652777778209512.52457.15277777777-969.652777777723
27210200210097.986111111209608.333333333489.652777777761102.013888888934
28205500213210.069444444209066.6666666674143.40277777779-7710.06944444441
29211400208536.319444444208575-38.68055555555622863.68055555562
30211700208323.819444444209275-951.1805555555533376.18055555559
31209300212049.652777778210879.1666666671170.48611111112-2749.65277777775
32207500208781.736111111212270.833333333-3489.09722222220-1281.73611111107
33203300210167.986111111213620.833333333-3452.84722222221-6867.98611111107
34207100216206.736111111215266.666666667940.069444444438-9106.73611111107
35206900220112.986111111216837.53275.4861111111-13212.9861111111
36228700215976.319444444218029.166666667-2052.8472222222312723.6805555556
37226900216454.236111111218945.833333333-2491.5972222222110445.7638888889
38226500222332.1527777782198752457.152777777774167.84722222225
39227100221439.652777778220950489.6527777777615660.34722222222
40228100226601.736111111222458.3333333334143.402777777791498.26388888891
41226500224269.652777778224308.333333333-38.68055555555622230.34722222219
42225200224577.986111111225529.166666667-951.180555555553622.013888888905
43217800227216.319444444226045.8333333331170.48611111112-9416.31944444444
44221300222981.736111111226470.833333333-3489.09722222220-1681.73611111112
45215300223472.152777778226925-3452.84722222221-8172.15277777775
46231300228410.902777778227470.833333333940.0694444444382889.09722222228
47227100231842.152777778228566.6666666673275.4861111111-4742.15277777772
48237800227834.652777778229887.5-2052.847222222239965.34722222225
49230200229275.069444444231766.666666667-2491.59722222221924.930555555591
50233400236319.652777778233862.52457.15277777777-2919.65277777772
51231100236806.319444444236316.666666667489.652777777761-5706.31944444441
52237200242572.569444444238429.1666666674143.40277777779-5372.56944444444
53243700240586.319444444240625-38.68055555555623113.68055555556
54239700242061.319444444243012.5-951.180555555553-2361.31944444447
55248400246182.986111111245012.51170.486111111122217.01388888888
56241000244131.736111111247620.833333333-3489.09722222220-3131.73611111112
57254500246692.986111111250145.833333333-3452.847222222217807.0138888889
58242800253669.236111111252729.166666667940.069444444438-10869.2361111111
59268300258037.986111111254762.53275.486111111110262.0138888889
60253900254384.652777778256437.5-2052.84722222223-484.65277777781
61262100256208.402777778258700-2491.597222222215891.59722222216
62264100263740.486111111261283.3333333332457.15277777777359.513888888905
63261000263685.486111111263195.833333333489.652777777761-2685.48611111112
64269300269901.736111111265758.3333333334143.40277777779-601.736111111182
65260400268290.486111111268329.166666667-38.6805555555562-7890.48611111112
66263200269265.486111111270216.666666667-951.180555555553-6065.48611111107
67279200273524.652777778272354.1666666671170.486111111125675.34722222225
68272200270777.569444444274266.666666667-3489.097222222201422.43055555550
69269200273047.152777778276500-3452.84722222221-3847.15277777781
70289600279456.736111111278516.666666667940.06944444443810143.2638888889
71283200283742.152777778280466.6666666673275.4861111111-542.15277777781
72284300280222.152777778282275-2052.847222222234077.84722222219
73283000280887.569444444283379.166666667-2491.597222222212112.43055555556
74289100287207.1527777782847502457.152777777771892.84722222225
75289600287456.319444444286966.666666667489.6527777777612143.68055555556
76289100292543.4027777782884004143.40277777779-3443.40277777781
77287400288994.652777778289033.333333333-38.6805555555562-1594.65277777775
78279600288794.652777778289745.833333333-951.180555555553-9194.65277777775
79289300291912.152777778290741.6666666671170.48611111112-2612.15277777781
80295000288785.902777778292275-3489.097222222206214.09722222225
81299600289988.819444444293441.666666667-3452.847222222219611.1805555555
82293600295648.402777778294708.333333333940.069444444438-2048.40277777775
83294400299137.986111111295862.53275.4861111111-4737.98611111112
84290200295138.819444444297191.666666667-2052.84722222223-4938.81944444444
85301000296675.069444444299166.666666667-2491.597222222214324.9305555555
86307900303469.652777778301012.52457.152777777774430.34722222219
87298800302289.652777778301800489.652777777761-3489.65277777775
88310300306351.736111111302208.3333333334143.402777777793948.26388888888
89293900302611.319444444302650-38.6805555555562-8711.31944444444
90305000302077.986111111303029.166666667-951.1805555555532922.01388888893
91311300305253.819444444304083.3333333331170.486111111126046.18055555556
92317300301727.569444444305216.666666667-3489.0972222222015572.4305555556
93296200303605.486111111307058.333333333-3452.84722222221-7405.48611111107
94306800309331.736111111308391.666666667940.069444444438-2531.73611111112
95291800312383.819444444309108.3333333333275.4861111111-20583.8194444444
96301900307776.319444444309829.166666667-2052.84722222223-5876.31944444438
97314600307225.069444444309716.666666667-2491.597222222217374.93055555556
98321500311332.1527777783088752457.1527777777710167.8472222223
99329400308531.319444444308041.666666667489.65277777776120868.6805555556
100311700312155.902777778308012.54143.40277777779-455.902777777752
101309700309152.986111111309191.666666667-38.6805555555562547.013888888934
102306500308552.986111111309504.166666667-951.180555555553-2052.98611111112
103307100308695.4861111113075251170.48611111112-1595.48611111112
104301300301940.069444444305429.166666667-3489.09722222220-640.069444444438
105292200299388.819444444302841.666666667-3452.84722222221-7188.81944444444
106310100302148.402777778301208.333333333940.0694444444387951.59722222225
107316800304112.986111111300837.53275.486111111112687.0138888888
108284400298009.652777778300062.5-2052.84722222223-13609.6527777778
109284600297058.402777778299550-2491.59722222221-12458.4027777778
110301200300298.819444444297841.6666666672457.15277777777901.180555555562
111287600296627.152777778296137.5489.652777777761-9027.15277777775
112314300298564.236111111294420.8333333334143.4027777777915735.7638888889
113298200291765.486111111291804.166666667-38.68055555555626434.51388888893
114299400288852.986111111289804.166666667-951.18055555555310547.0138888889
115301900288445.4861111112872751170.4861111111213454.5138888889
116265500280369.236111111283858.333333333-3489.09722222220-14869.2361111111
117287100277472.152777778280925-3452.847222222219627.8472222222
118274000278852.569444444277912.5940.069444444438-4852.56944444444
119290100278350.4861111112750753275.486111111111749.5138888889
120263100271013.819444444273066.666666667-2052.84722222223-7913.81944444444
121245200268266.736111111270758.333333333-2491.59722222221-23066.7361111111
122258600271611.319444444269154.1666666672457.15277777777-13011.3194444444
123259800269456.319444444268966.666666667489.652777777761-9656.31944444444
124269800272751.736111111268608.3333333334143.40277777779-2951.73611111112
125274600267240.486111111267279.166666667-38.68055555555627359.51388888888
126274800266636.319444444267587.5-951.1805555555538163.68055555556
127271100NANA1170.48611111112NA
128257800NANA-3489.09722222220NA
129290300NANA-3452.84722222221NA
130262200NANA940.069444444438NA
131270000NANA3275.4861111111NA
132290600NANA-2052.84722222223NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/May/28/t127504855399l8k5kd905s0m3/1m16w1275048312.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/28/t127504855399l8k5kd905s0m3/1m16w1275048312.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/May/28/t127504855399l8k5kd905s0m3/2m16w1275048312.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/28/t127504855399l8k5kd905s0m3/2m16w1275048312.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/May/28/t127504855399l8k5kd905s0m3/3ft6h1275048312.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/28/t127504855399l8k5kd905s0m3/3ft6h1275048312.ps (open in new window)


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