Home » date » 2009 » Dec » 11 »

WS 9 Classical Decomposition

*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: Fri, 11 Dec 2009 02:02:56 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Dec/11/t1260522271farxw4hbf39wgaz.htm/, Retrieved Fri, 11 Dec 2009 10:04:37 +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/2009/Dec/11/t1260522271farxw4hbf39wgaz.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 «
108.8 128.4 121.1 119.5 128.7 108.7 105.5 119.8 111.3 110.6 120.1 97.5 107.7 127.3 117.2 119.8 116.2 111 112.4 130.6 109.1 118.8 123.9 101.6 112.8 128 129.6 125.8 119.5 115.7 113.6 129.7 112 116.8 127 112.1 114.2 121.1 131.6 125 120.4 117.7 117.5 120.6 127.5 112.3 124.5 115.2 104.7 130.9 129.2 113.5 125.6 107.6 107 121.6 110.7 106.3 118.6 104.6
 
Output produced by software:


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


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1108.8NANA0.931589383338221NA
2128.4NANA1.07567516197286NA
3121.1NANA1.07522779088427NA
4119.5NANA1.02612324059806NA
5128.7NANA1.02207725546480NA
6108.7NANA0.958011024227935NA
7105.5109.374607482350114.9541666666670.9514627494930570.964574890172977
8119.8121.948216255011114.86251.061688682163550.982384192889554
9111.3111.635304139402114.6541666666670.9736698402244610.996996432786322
10110.6111.183928997099114.5041666666670.9710033462866620.994748080928907
11120.1119.711506887963113.9958333333331.050139319898791.00324524452274
1297.5102.592191349491113.5708333333330.9033322054473320.950364727738934
13107.7106.158491853821113.9541666666670.9315893833382211.01452081806420
14127.3123.370977118604114.6916666666671.075675161972861.03184722187633
15117.2123.704957341235115.051.075227790884270.947415548406103
16119.8118.312009640956115.31.026123240598061.01257683276245
17116.2118.356546182824115.81.022077255464800.981779240334603
18111111.253021901070116.1291666666670.9580110242279350.997725707610038
19112.4110.857303600310116.51250.9514627494930571.01391605559208
20130.6123.956577345437116.7541666666671.061688682163551.05359475710635
21109.1114.211472258329117.30.9736698402244610.955245544451367
22118.8114.643128418245118.0666666666670.9710033462866621.03625923017897
23123.9124.393378022512118.4541666666671.050139319898790.996033727595834
24101.6107.304574354575118.78750.9033322054473320.946837547337685
25112.8110.890189596693119.0333333333330.9315893833382211.01722253709055
26128128.054646053027119.0458333333331.075675161972860.999573259895585
27129.6128.090990704884119.1291666666671.075227790884271.01178076058911
28125.8122.279686171268119.1666666666671.026123240598061.02878903225022
29119.5121.844384817097119.21251.022077255464800.980759188692885
30115.7114.749762139502119.7791666666670.9580110242279351.00828095712602
31113.6114.437182195277120.2750.9514627494930570.992684351543637
32129.7127.451302590892120.0458333333331.061688682163551.01764358122197
33112116.686216435566119.8416666666670.9736698402244610.959839160282018
34116.8116.415209525218119.8916666666670.9710033462866621.00330532819853
35127125.907328875366119.8958333333331.050139319898791.00867837586894
36112.1108.414920190437120.0166666666670.9033322054473321.03399052273515
37114.2112.035268213713120.26250.9315893833382211.01932187801932
38121.1129.130321215000120.0458333333331.075675161972860.937812272598394
39131.6129.363343590764120.31251.075227790884271.01728972324890
40125123.925758869728120.7708333333331.026123240598061.00866842487042
41120.4123.139016007353120.4791666666671.022077255464800.977756716789184
42117.7115.444320132067120.5041666666670.9580110242279351.01953911517996
43117.5114.401502342171120.23750.9514627494930571.02708441405394
44120.6127.668064030167120.251.061688682163550.944637180144776
45127.5117.384013154394120.5583333333330.9736698402244611.08617857384293
46112.3116.500172318018119.9791666666670.9710033462866620.963947072056229
47124.5125.719178913884119.7166666666671.050139319898790.99030236337513
48115.2107.959490203524119.51250.9033322054473321.06706691355087
49104.7110.536961955511118.6541666666670.9315893833382210.947194478188574
50130.9127.207551862974118.2583333333331.075675161972861.02902695699233
51129.2126.446788207990117.61.075227790884271.02177367911853
52113.5119.697276015763116.651.026123240598060.948225421479541
53125.6118.718531877467116.1541666666671.022077255464801.05796456554597
54107.6110.618339597519115.4666666666670.9580110242279350.972713931446621
55107NANA0.951462749493057NA
56121.6NANA1.06168868216355NA
57110.7NANA0.973669840224461NA
58106.3NANA0.971003346286662NA
59118.6NANA1.05013931989879NA
60104.6NANA0.903332205447332NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/11/t1260522271farxw4hbf39wgaz/1p3of1260522169.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/11/t1260522271farxw4hbf39wgaz/1p3of1260522169.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/11/t1260522271farxw4hbf39wgaz/2xl9n1260522169.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/11/t1260522271farxw4hbf39wgaz/2xl9n1260522169.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/11/t1260522271farxw4hbf39wgaz/3so2o1260522169.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/11/t1260522271farxw4hbf39wgaz/3so2o1260522169.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/11/t1260522271farxw4hbf39wgaz/4xdj11260522169.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/11/t1260522271farxw4hbf39wgaz/4xdj11260522169.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