Home » date » 2010 » Dec » 20 »

Paper 'Classical decompostion of additive time series'

*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: Mon, 20 Dec 2010 14:30:24 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Dec/20/t12928553235pek0arvw72eqjc.htm/, Retrieved Mon, 20 Dec 2010 15:28:45 +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/Dec/20/t12928553235pek0arvw72eqjc.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:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
9,3 14,2 17,3 23 16,3 18,4 14,2 9,1 5,9 7,2 6,8 8 14,3 14,6 17,5 17,2 17,2 14,1 10,4 6,8 4,1 6,5 6,1 6,3 9,3 16,4 16,1 18 17,6 14 10,5 6,9 2,8 0,7 3,6 6,7 12,5 14,4 16,5 18,7 19,4 15,8 11,3 9,7 2,9 0,1 2,5 6,7 10,3 11,2 17,4 20,5 17 14,2 10,6 6,1
 
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'RServer@AstonUniversity' @ vre.aston.ac.uk


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
19.3NANA0.85914351851852NA
214.2NANA3.99108796296296NA
317.3NANA5.59108796296297NA
423NANA6.99803240740741NA
516.3NANA7.25636574074074NA
618.4NANA3.90081018518519NA
714.212.757754629629612.68333333333330.07442129629629681.44224537037037
89.110.152199074074112.9083333333333-2.75613425925926-1.05219907407407
95.95.6924768518518512.9333333333333-7.240856481481480.207523148148148
107.24.5813657407407412.7-8.118634259259262.61863425925926
116.85.9674768518518512.4958333333333-6.528356481481480.83252314814815
1288.3271990740740812.3541666666667-4.02696759259259-0.327199074074075
1314.312.875810185185212.01666666666670.859143518518521.42418981481481
1414.615.75358796296311.76253.99108796296296-1.15358796296296
1517.517.182754629629611.59166666666675.591087962962970.317245370370371
1617.218.485532407407411.48756.99803240740741-1.28553240740741
1717.218.685532407407411.42916666666677.25636574074074-1.48553240740741
1814.115.229976851851911.32916666666673.90081018518519-1.12997685185185
1910.411.124421296296311.050.0744212962962968-0.724421296296297
206.88.160532407407410.9166666666667-2.75613425925926-1.36053240740741
214.13.6924768518518510.9333333333333-7.240856481481480.407523148148149
226.52.7896990740740710.9083333333333-8.118634259259263.71030092592593
236.14.4299768518518510.9583333333333-6.528356481481481.67002314814815
246.36.9438657407407410.9708333333333-4.02696759259259-0.643865740740742
259.311.829976851851910.97083333333330.85914351851852-2.52997685185185
2616.414.970254629629610.97916666666673.991087962962961.42974537037037
2716.116.520254629629610.92916666666675.59108796296297-0.42025462962963
281817.631365740740710.63333333333336.998032407407410.368634259259258
2917.617.543865740740710.28757.256365740740740.0561342592592595
301414.100810185185210.23.90081018518519-0.100810185185185
3110.510.424421296296310.350.07442129629629680.0755787037037035
326.97.6438657407407410.4-2.75613425925926-0.743865740740741
332.83.0924768518518510.3333333333333-7.24085648148148-0.292476851851852
340.72.2605324074074110.3791666666667-8.11863425925926-1.56053240740741
353.63.9549768518518510.4833333333333-6.52835648148148-0.354976851851848
366.76.6063657407407410.6333333333333-4.026967592592590.093634259259261
3712.511.600810185185210.74166666666670.859143518518520.899189814814813
3814.414.882754629629610.89166666666673.99108796296296-0.482754629629627
3916.516.60358796296311.01255.59108796296297-0.103587962962965
4018.717.989699074074110.99166666666676.998032407407410.710300925925926
4119.418.177199074074110.92083333333337.256365740740741.22280092592593
4215.814.775810185185210.8753.900810185185191.02418981481482
4311.310.857754629629610.78333333333330.07442129629629680.442245370370372
449.77.8021990740740710.5583333333333-2.756134259259261.89780092592593
452.93.2216435185185210.4625-7.24085648148148-0.321643518518519
460.12.4563657407407410.575-8.11863425925926-2.35636574074074
472.54.0216435185185210.55-6.52835648148148-1.52164351851852
486.76.3563657407407410.3833333333333-4.026967592592590.343634259259261
4910.3NA10.2875NANA
5011.2NA10.1083333333333NANA
5117.4NANANANA
5220.5NANANANA
5317NANANANA
5414.2NANANANA
5510.6NANANANA
566.1NANANANA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/20/t12928553235pek0arvw72eqjc/1vtcy1292855420.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/20/t12928553235pek0arvw72eqjc/1vtcy1292855420.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/20/t12928553235pek0arvw72eqjc/2vtcy1292855420.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/20/t12928553235pek0arvw72eqjc/2vtcy1292855420.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/20/t12928553235pek0arvw72eqjc/35lbj1292855420.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/20/t12928553235pek0arvw72eqjc/35lbj1292855420.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/20/t12928553235pek0arvw72eqjc/45lbj1292855420.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/20/t12928553235pek0arvw72eqjc/45lbj1292855420.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])
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