Home » date » 2009 » Jun » 03 »

classical decomposition 9b - Kelly Michielsen - MAR 201b

*Unverified author*
R Software Module: rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Wed, 03 Jun 2009 02:02:43 -0600
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Jun/03/t12440161998npvp8p2jcw2s0n.htm/, Retrieved Wed, 03 Jun 2009 10:03:23 +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/2009/Jun/03/t12440161998npvp8p2jcw2s0n.htm/},
    year = {2009},
}
@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 = {2009},
    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 «
104.9 110.9 104.8 94.1 95.8 99.3 101.1 104.0 99.0 105.4 107.1 110.7 117.1 118.7 126.5 127.5 134.6 131.8 135.9 142.7 141.7 153.4 145.0 137.7 148.3 152.2 169.4 168.6 161.1 174.1 179.0 190.6 190.0 181.6 174.8 180.5 196.8 193.8 197.0 216.3 221.4 217.9 229.7 227.4 204.2 196.6 198.8 207.5 190.7 201.6 210.5 223.5 223.8 231.2 244.0 234.7 250.2 265.7 287.6 283.3 295.4 312.3 333.8 347.7 383.2 407.1 413.6 362.7 321.9 239.4 191.0 159.7 166.7
 
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'George Udny Yule' @ 72.249.76.132


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1104.9NANA0.955656206640385NA
2110.9NANA0.95949601360411NA
3104.8NANA0.998464941325473NA
494.1NANA1.02127621594823NA
595.8NANA1.03721996947NA
699.3NANA1.05719797800196NA
7101.1112.763815369265103.61.088453816305640.896564200749421
8104105.871224393949104.4333333333331.013768506804490.982325467522823
999104.568410338976105.66250.9896454308669170.94674863736644
10105.4105.011318643603107.9583333333330.9727022954251131.00370132821316
11107.1106.791801532138110.9666666666670.9623773042848171.00288597498534
12110.7107.527526798223113.93750.9437413213228591.02950382377649
13117.1111.564898323543116.7416666666670.9556562066403851.04961329019819
14118.7114.951620329829119.8041666666670.959496013604111.03260832391415
15126.5123.006720500709123.1958333333330.9984649413254731.02839909465979
16127.5129.676547520026126.9751.021276215948230.983215565484653
17134.6135.413388764181130.5541666666671.037219969470.99399329141967
18131.8140.880440551911133.2583333333331.057197978001960.935545058516727
19135.9147.685041975737135.6833333333331.088453816305640.920201519273201
20142.7140.284441164517138.3791666666671.013768506804491.01721900743540
21141.7140.096681307098141.56250.9896454308669171.01144437311393
22153.4141.102626730106145.06250.9727022954251131.08715197976730
23145142.315553776552147.8791666666670.9623773042848171.01886263414091
24137.7142.265071933915150.7458333333330.9437413213228590.96791150581194
25148.3147.461734585472154.3041666666670.9556562066403851.00568463009664
26152.2151.692321850753158.0958333333330.959496013604111.00334676233479
27169.4161.855327259448162.1041666666670.9984649413254731.04661368191149
28168.6168.808447861109165.2916666666671.021276215948230.998765181104677
29161.1173.950432379865167.7083333333331.037219969470.926125895727569
30174.1180.498934777535170.7333333333331.057197978001960.964548628580987
31179189.976007963446174.53751.088453816305640.94222424146549
32190.6180.746476692351178.2916666666671.013768506804491.05451571443033
33190179.299010937314181.1750.9896454308669171.05968236526652
34181.6179.281191825541184.31250.9727022954251131.01293391766781
35174.8181.708864765277188.81250.9623773042848170.961978383530151
36180.5182.28363621351193.150.9437413213228590.990215050288875
37196.8188.347892626237197.08750.9556562066403851.04487497712829
38193.8192.602833130798200.7333333333330.959496013604111.00621572824107
39197202.54693388905202.8583333333330.9984649413254730.972614081178398
40216.3208.416943769634204.0751.021276215948231.03782349020087
41221.4213.356147719979205.71.037219969471.03770152566955
42217.9219.712169778257207.8251.057197978001960.991752073724062
43229.7227.155776238753208.6958333333331.088453816305641.01120034807555
44227.4211.641071937218208.7666666666671.013768506804491.07446063242137
45204.2207.483288103878209.6541666666670.9896454308669170.9841756503192
46196.6204.77004489191210.5166666666670.9727022954251130.960101366895618
47198.8202.981413095406210.9166666666670.9623773042848170.97940001977698
48207.5199.668137803378211.5708333333330.9437413213228591.03922439645495
49190.7203.287984656715212.7208333333330.9556562066403850.938078068519536
50201.6204.968338006121213.6208333333330.959496013604110.98356654477034
51210.5215.510337043926215.8416666666670.9984649413254730.976751291317853
52223.5225.331831096277220.63751.021276215948230.99187051786086
53223.8235.673664063075227.2166666666671.037219969470.94961819722081
54231.2247.463616700809234.0751.057197978001960.934278756135404
55244262.965906795209241.5958333333331.088453816305640.927876936495882
56234.7254.020819557091250.5708333333331.013768506804490.923940015661792
57250.2257.625323267801260.3208333333330.9896454308669170.971177820667563
58265.7263.245664551883270.6333333333330.9727022954251131.00932336512472
59287.6271.823469595246282.450.9623773042848171.05803961824284
60283.3279.744588917623296.4208333333330.9437413213228591.01270949009643
61295.4297.033876627276310.8166666666670.9556562066403850.994499359312723
62312.3310.125103197075323.2166666666670.959496013604111.00701296599503
63333.8331.028570484694331.53750.9984649413254731.00837217618784
64347.7340.523277620104333.4291666666671.021276215948231.02107557060432
65383.2340.527959476747328.3083333333331.037219969471.12531141521778
66407.1337.387114713025319.1333333333331.057197978001961.20662580829819
67413.6335.919523833095308.6208333333331.088453816305641.23124727994525
68362.7NANA1.01376850680449NA
69321.9NANA0.989645430866917NA
70239.4NANA0.972702295425113NA
71191NANA0.962377304284817NA
72159.7NANA0.943741321322859NA
73166.7NANANANA
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/03/t12440161998npvp8p2jcw2s0n/1zhmh1244016160.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/03/t12440161998npvp8p2jcw2s0n/1zhmh1244016160.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/03/t12440161998npvp8p2jcw2s0n/22aoa1244016160.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/03/t12440161998npvp8p2jcw2s0n/22aoa1244016160.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/03/t12440161998npvp8p2jcw2s0n/3lpsy1244016160.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/03/t12440161998npvp8p2jcw2s0n/3lpsy1244016160.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/03/t12440161998npvp8p2jcw2s0n/48v2x1244016160.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/03/t12440161998npvp8p2jcw2s0n/48v2x1244016160.ps (open in new window)


 
Parameters (Session):
par1 = multiplicative ; par2 = 12 ;
 
Parameters (R input):
par1 = multiplicative ; 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