Home » date » 2009 » Dec » 04 »

ws9: 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, 04 Dec 2009 10:14:02 -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/04/t125994693834mgjb7nmkymtn9.htm/, Retrieved Fri, 04 Dec 2009 18:15:44 +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/04/t125994693834mgjb7nmkymtn9.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 «
6,3 6,2 6,1 6,3 6,5 6,6 6,5 6,2 6,2 5,9 6,1 6,1 6,1 6,1 6,1 6,4 6,7 6,9 7 7 6,8 6,4 5,9 5,5 5,5 5,6 5,8 5,9 6,1 6,1 6 6 5,9 5,5 5,6 5,4 5,2 5,2 5,2 5,5 5,8 5,8 5,5 5,3 5,1 5,2 5,8 5,8 5,5 5 4,9 5,3 6,1 6,5 6,8 6,6 6,4 6,4 6,6
 
Output produced by software:


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


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
16.3NANA0.932947965393243NA
26.2NANA0.942710772479635NA
36.1NANA0.958746622447501NA
46.3NANA1.00292315303771NA
56.5NANA1.05077040273922NA
66.6NANA1.06226047029432NA
76.56.524745664605726.241666666666671.045353110484230.996207413150224
86.26.461667277383266.229166666666671.037324512757180.959504681044298
96.26.314895692928486.2251.014441075169230.98180560716828
105.96.113830751598056.229166666666670.98148453537360.96502507833699
116.16.250177937944326.241666666666671.001363621566510.975972214001685
126.16.072581911088316.26250.9696737582576141.00451506283705
136.15.873684898788296.295833333333330.9329479653932431.03853034425772
146.15.986213405245686.350.9427107724796351.01900810864087
156.16.143967938851076.408333333333330.9587466224475010.992843722609124
166.46.473033183564246.454166666666661.002923153037710.988717316674712
176.76.794981937713656.466666666666671.050770402739220.986021752731015
186.96.833875692226776.433333333333331.062260470294321.00967595998980
1976.672837355257656.383333333333331.045353110484231.04902901529356
2076.574044099598626.33751.037324512757181.06479358731825
216.86.395205611379386.304166666666671.014441075169231.06329654013005
226.46.154725940571956.270833333333330.98148453537361.03985133729695
235.96.233488544251546.2251.001363621566510.946500496169343
245.55.979654842588626.166666666666670.9696737582576140.919785530232883
255.55.683208022520516.091666666666670.9329479653932430.967763273525355
265.65.664120557981816.008333333333330.9427107724796350.988679520973216
275.85.684568515594985.929166666666670.9587466224475011.02030611190425
285.95.871279291741615.854166666666671.002923153037711.00489172918393
296.16.098846545898915.804166666666671.050770402739221.00018912659835
306.16.147832471828365.78751.062260470294320.992219620159211
3166.032558575086065.770833333333331.045353110484230.994602858027682
3265.955971577414135.741666666666671.037324512757181.00739231576471
335.95.782314128464635.71.014441075169231.02035272884191
345.55.553566662655625.658333333333330.98148453537360.99035454764308
355.65.636842719734835.629166666666671.001363621566510.993463943990163
365.45.434213353568715.604166666666670.9696737582576140.99370408349053
375.25.197297623878195.570833333333330.9329479653932431.00051995793148
385.25.204549056397995.520833333333330.9427107724796350.99912594610048
395.25.233158647525955.458333333333330.9587466224475010.993663741201192
405.55.428321565816625.41251.002923153037711.01320452985592
415.85.682916594814645.408333333333331.050770402739221.02060269638520
425.85.771615221932465.433333333333331.062260470294321.00491799556555
435.55.710241366020095.46251.045353110484230.963181702393322
445.35.670707336405915.466666666666671.037324512757180.934627672631601
455.15.524477021859125.445833333333331.014441075169230.9231643067426
465.25.324553604401785.4250.98148453537360.976607690774526
475.85.436569995421525.429166666666671.001363621566511.06684913555505
485.85.304923519134365.470833333333330.9696737582576141.09332396199115
495.5NA5.55416666666667NANA
505NA5.6625NANA
514.9NA5.77083333333333NANA
525.3NA5.875NANA
536.1NA5.95833333333333NANA
546.5NANANANA
556.8NANANANA
566.6NANANANA
576.4NANANANA
586.4NANANANA
596.6NANANANA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/04/t125994693834mgjb7nmkymtn9/1kxs21259946841.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t125994693834mgjb7nmkymtn9/1kxs21259946841.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t125994693834mgjb7nmkymtn9/2yc4n1259946841.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t125994693834mgjb7nmkymtn9/2yc4n1259946841.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t125994693834mgjb7nmkymtn9/31mhd1259946841.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t125994693834mgjb7nmkymtn9/31mhd1259946841.ps (open in new window)


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