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:47:10 -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/t1263412237rm3c0yfuqgr38ny.htm/, Retrieved Wed, 13 Jan 2010 20:50:43 +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/t1263412237rm3c0yfuqgr38ny.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 «
104,28 104,33 104,46 104,46 104,5 104,61 104,66 104,66 105,03 105,32 105,52 105,67 105,71 105,81 106 106,02 106,19 106,22 106,34 106,42 106,84 107,23 107,42 107,63 107,69 107,81 107,92 108,06 108,21 108,44 108,55 108,66 109,23 109,7 109,94 110,13 110,39 110,46 110,67 110,89 110,98 111,12 111,33 111,43 111,87 112,22 112,47 112,64 112,84 113,03 113,09 113,27 113,44 113,51 113,66 113,62 114,01 114,55 114,77 114,87 115,11 115,09 115,24 115,27 115,41 115,59 115,6 115,68 116,2 116,55 116,73 117,04 117,12 117,28 117,48 117,66 117,92 118,12 118,17 118,39
 
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
1104.28NANA0.165923611111111NA
2104.33NANA0.0749236111111083NA
3104.46NANA0.0340069444444448NA
4104.46NANA-0.0346597222222276NA
5104.5NANA-0.0776597222222198NA
6104.61NANA-0.135826388888882NA
7104.66104.645590277778104.85125-0.205659722222220.0144097222222541
8104.66104.642173611111104.9725-0.3303263888888840.0178263888888921
9105.03105.044756944444105.098333333333-0.0535763888888856-0.0147569444444429
10105.32105.401256944444105.22750.173756944444443-0.0812569444444478
11105.52105.557923611111105.3629166666670.195006944444440-0.0379236111111112
12105.67105.694506944444105.5004166666670.194090277777772-0.0245069444444255
13105.71105.803423611111105.63750.165923611111111-0.0934236111111062
14105.81105.855756944444105.7808333333330.0749236111111083-0.0457569444444346
15106105.963590277778105.9295833333330.03400694444444480.0364097222222313
16106.02106.049923611111106.084583333333-0.0346597222222276-0.0299236111111156
17106.19106.165673611111106.243333333333-0.07765972222221980.0243263888889231
18106.22106.268340277778106.404166666667-0.135826388888882-0.0483402777777684
19106.34106.362673611111106.568333333333-0.20565972222222-0.0226736111110881
20106.42106.403840277778106.734166666667-0.3303263888888840.0161597222222269
21106.84106.843923611111106.8975-0.0535763888888856-0.00392361111111938
22107.23107.236256944444107.06250.173756944444443-0.00625694444445912
23107.42107.426673611111107.2316666666670.195006944444440-0.0066736111111112
24107.63107.602423611111107.4083333333330.1940902777777720.0275763888888889
25107.69107.758840277778107.5929166666670.165923611111111-0.068840277777781
26107.81107.853256944444107.7783333333330.0749236111111083-0.0432569444444368
27107.92108.005256944444107.971250.0340069444444448-0.0852569444444384
28108.06108.139090277778108.17375-0.0346597222222276-0.0790902777777518
29108.21108.304006944444108.381666666667-0.0776597222222198-0.0940069444444305
30108.44108.455006944444108.590833333333-0.135826388888882-0.0150069444444227
31108.55108.601840277778108.8075-0.20565972222222-0.0518402777777567
32108.66108.700090277778109.030416666667-0.330326388888884-0.040090277777793
33109.23109.201840277778109.255416666667-0.05357638888888560.0281597222222416
34109.7109.661673611111109.4879166666670.1737569444444430.0383263888889047
35109.94109.916256944444109.721250.1950069444444400.0237430555555562
36110.13110.142423611111109.9483333333330.194090277777772-0.0124236111111031
37110.39110.341756944444110.1758333333330.1659236111111110.0482430555555595
38110.46110.482006944444110.4070833333330.0749236111111083-0.0220069444444420
39110.67110.666506944444110.63250.03400694444444480.00349305555556612
40110.89110.812840277778110.8475-0.03465972222222760.077159722222234
41110.98110.980256944444111.057916666667-0.0776597222222198-0.000256944444430474
42111.12111.132090277778111.267916666667-0.135826388888882-0.0120902777777587
43111.33111.268923611111111.474583333333-0.205659722222220.0610763888888926
44111.43111.353423611111111.68375-0.3303263888888840.0765763888888813
45111.87111.838090277778111.891666666667-0.05357638888888560.031909722222224
46112.22112.265423611111112.0916666666670.173756944444443-0.0454236111111328
47112.47112.488340277778112.2933333333330.195006944444440-0.0183402777777957
48112.64112.689506944444112.4954166666670.194090277777772-0.0495069444444596
49112.84112.858006944444112.6920833333330.165923611111111-0.0180069444444371
50113.03112.955340277778112.8804166666670.07492361111110830.0746597222222363
51113.09113.094840277778113.0608333333330.0340069444444448-0.00484027777777385
52113.27113.212423611111113.247083333333-0.03465972222222760.0575763888888901
53113.44113.362340277778113.44-0.07765972222221980.077659722222208
54113.51113.492923611111113.62875-0.1358263888888820.0170763888888956
55113.66113.610590277778113.81625-0.205659722222220.0494097222222223
56113.62113.666340277778113.996666666667-0.330326388888884-0.0463402777777731
57114.01114.118506944444114.172083333333-0.0535763888888856-0.108506944444429
58114.55114.518756944444114.3450.1737569444444430.0312430555555636
59114.77114.705423611111114.5104166666670.1950069444444400.064576388888895
60114.87114.873256944444114.6791666666670.194090277777772-0.0032569444444448
61115.11115.012590277778114.8466666666670.1659236111111110.097409722222224
62115.09115.088256944444115.0133333333330.07492361111110830.00174305555556487
63115.24115.224423611111115.1904166666670.03400694444444480.0155763888888885
64115.27115.330340277778115.365-0.0346597222222276-0.060340277777783
65115.41115.452340277778115.53-0.0776597222222198-0.0423402777777966
66115.59115.566256944444115.702083333333-0.1358263888888820.023743055555542
67115.6115.670590277778115.87625-0.20565972222222-0.0705902777777965
68115.68115.720923611111116.05125-0.330326388888884-0.0409236111111113
69116.2116.182256944444116.235833333333-0.05357638888888560.0177430555555418
70116.55116.602506944444116.428750.173756944444443-0.0525069444444455
71116.73116.827923611111116.6329166666670.195006944444440-0.0979236111110993
72117.04117.037006944444116.8429166666670.1940902777777720.00299305555556373
73117.12NA117.055416666667NANA
74117.28NA117.275416666667NANA
75117.48NANANANA
76117.66NANANANA
77117.92NANANANA
78118.12NANANANA
79118.17NANANANA
80118.39NANANANA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jan/13/t1263412237rm3c0yfuqgr38ny/1ia0k1263412027.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/13/t1263412237rm3c0yfuqgr38ny/1ia0k1263412027.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/13/t1263412237rm3c0yfuqgr38ny/25bca1263412027.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/13/t1263412237rm3c0yfuqgr38ny/25bca1263412027.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/13/t1263412237rm3c0yfuqgr38ny/3zyhs1263412027.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/13/t1263412237rm3c0yfuqgr38ny/3zyhs1263412027.ps (open in new window)


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