Home » date » 2009 » Dec » 03 »

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: Thu, 03 Dec 2009 06:22:52 -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/03/t1259846635x5aqcaudgmfx3x0.htm/, Retrieved Thu, 03 Dec 2009 14:24:00 +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/03/t1259846635x5aqcaudgmfx3x0.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:
JSSHWWS9P7
 
Dataseries X:
» Textbox « » Textfile « » CSV «
11.1 10.9 10 9.2 9.2 9.5 9.6 9.5 9.1 8.9 9 10.1 10.3 10.2 9.6 9.2 9.3 9.4 9.4 9.2 9 9 9 9.8 10 9.8 9.3 9 9 9.1 9.1 9.1 9.2 8.8 8.3 8.4 8.1 7.7 7.9 7.9 8 7.9 7.6 7.1 6.8 6.5 6.9 8.2 8.7 8.3 7.9 7.5 7.8 8.3 8.4 8.2 7.7 7.2 7.3 8.1
 
Output produced by software:


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


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
111.1NANA0.590364583333333NA
210.9NANA0.341406250000000NA
310NANA0.0445312500000002NA
49.2NANA-0.198177083333334NA
59.2NANA-0.0377604166666664NA
69.5NANA0.150781250000000NA
79.69.657031259.641666666666670.0153645833333326-0.0570312499999996
89.59.446614583333339.57916666666667-0.1325520833333350.0533854166666661
99.19.249739583333339.53333333333333-0.283593750000000-0.149739583333334
108.99.047656259.51666666666667-0.469010416666666-0.147656249999999
1199.084114583333339.52083333333333-0.436718749999999-0.0841145833333332
1210.19.936197916666679.520833333333330.4153645833333330.163802083333334
1310.310.09869791666679.508333333333330.5903645833333330.201302083333335
1410.29.828906259.48750.3414062500000000.37109375
159.69.515364583333339.470833333333330.04453125000000020.084635416666666
169.29.272656259.47083333333333-0.198177083333334-0.0726562499999996
179.39.437239583333339.475-0.0377604166666664-0.137239583333333
189.49.613281259.46250.150781250000000-0.213281250000000
199.49.452864583333339.43750.0153645833333326-0.0528645833333314
209.29.275781259.40833333333333-0.132552083333335-0.0757812500000004
2199.095572916666679.37916666666666-0.283593750000000-0.095572916666665
2298.889322916666679.35833333333333-0.4690104166666660.110677083333334
2398.900781259.3375-0.4367187499999990.0992187500000004
249.89.727864583333339.31250.4153645833333330.0721354166666686
25109.877864583333339.28750.5903645833333330.122135416666667
269.89.612239583333339.270833333333330.3414062500000000.187760416666668
279.39.319531259.2750.0445312500000002-0.0195312499999982
2899.076822916666679.275-0.198177083333334-0.076822916666666
2999.199739583333339.2375-0.0377604166666664-0.199739583333335
309.19.300781259.150.150781250000000-0.200781250000000
319.19.027864583333339.01250.01536458333333260.0721354166666686
329.18.713281258.84583333333333-0.1325520833333350.386718750000002
339.28.416406258.7-0.2835937500000000.783593750000001
348.88.126822916666678.59583333333333-0.4690104166666660.673177083333336
358.38.071614583333338.50833333333333-0.4367187499999990.228385416666669
368.48.832031258.416666666666670.415364583333333-0.432031249999999
378.18.894531258.304166666666670.590364583333333-0.79453125
387.78.499739583333338.158333333333330.341406250000000-0.799739583333333
397.98.019531257.9750.0445312500000002-0.119531250000000
407.97.580989583333337.77916666666667-0.1981770833333340.319010416666668
4187.587239583333337.625-0.03776041666666640.412760416666667
427.97.709114583333337.558333333333330.1507812500000000.190885416666668
437.67.590364583333337.5750.01536458333333260.00963541666666679
447.17.492447916666667.625-0.132552083333335-0.392447916666665
456.87.366406257.65-0.283593750000000-0.566406250000001
466.57.164322916666677.63333333333333-0.469010416666666-0.664322916666667
476.97.171614583333337.60833333333333-0.436718749999999-0.271614583333332
488.28.032031257.616666666666670.4153645833333330.16796875
498.78.257031257.666666666666670.5903645833333330.44296875
508.38.087239583333337.745833333333330.3414062500000000.212760416666668
517.97.873697916666677.829166666666670.04453125000000020.0263020833333334
527.57.697656257.89583333333333-0.198177083333334-0.197656249999999
537.87.903906257.94166666666666-0.0377604166666664-0.103906249999999
548.38.104947916666677.954166666666670.1507812500000000.195052083333335
558.4NANA0.0153645833333326NA
568.2NANA-0.132552083333335NA
577.7NANA-0.283593750000000NA
587.2NANA-0.469010416666666NA
597.3NANA-0.436718749999999NA
608.1NANA0.415364583333333NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/03/t1259846635x5aqcaudgmfx3x0/17q2e1259846570.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/03/t1259846635x5aqcaudgmfx3x0/17q2e1259846570.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/03/t1259846635x5aqcaudgmfx3x0/2alb31259846570.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/03/t1259846635x5aqcaudgmfx3x0/2alb31259846570.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/03/t1259846635x5aqcaudgmfx3x0/3dfi81259846570.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/03/t1259846635x5aqcaudgmfx3x0/3dfi81259846570.ps (open in new window)


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