Home » date » 2009 » Dec » 02 »

ws 8 Ad hoc forecasting link 1

*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: Wed, 02 Dec 2009 13:02:57 -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/02/t1259784396ewiujhg40ml5kb2.htm/, Retrieved Wed, 02 Dec 2009 21:06:42 +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/02/t1259784396ewiujhg40ml5kb2.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:
ws 8 Ad hoc forecasting link 1
 
Dataseries X:
» Textbox « » Textfile « » CSV «
8.2 8.0 7.5 6.8 6.5 6.6 7.6 8.0 8.1 7.7 7.5 7.6 7.8 7.8 7.8 7.5 7.5 7.1 7.5 7.5 7.6 7.7 7.7 7.9 8.1 8.2 8.2 8.2 7.9 7.3 6.9 6.6 6.7 6.9 7.0 7.1 7.2 7.1 6.9 7.0 6.8 6.4 6.7 6.6 6.4 6.3 6.2 6.5 6.8 6.8 6.4 6.1 5.8 6.1 7.2 7.3 6.9 6.1 5.8 6.2 7.1 7.7 7.9 7.7 7.4 7.5 8.0 8.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'Gwilym Jenkins' @ 72.249.127.135


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
18.2NANA1.04719037696786NA
28NANA1.04798979186281NA
37.5NANA1.02767691179036NA
46.8NANA1.01399383174475NA
56.5NANA0.990039435715469NA
66.6NANA0.957980648057883NA
77.67.601860479603967.491666666666671.014708851560040.999755259964458
887.505131831421187.466666666666671.005151584565341.06593730525918
98.17.382660745851267.470833333333330.9881977573922481.09716540944291
107.77.24211079242897.51250.9640080921702361.06322593242426
117.57.228325760676547.583333333333330.9531858145947091.03758467013225
127.67.568433825275757.645833333333330.98987690357831.00417076709039
137.88.024096263516227.66251.047190376967860.972072086854799
147.88.00402203535227.63751.047989791862810.974510060760568
157.87.80606254247437.595833333333331.027676911790360.99922335461171
167.57.681003275466477.5751.013993831744750.97643494359069
177.57.507799054175647.583333333333330.9900394357154690.998961206324335
187.17.284644511273497.604166666666670.9579806480578830.974652913949646
197.57.741382946693477.629166666666671.014708851560040.9688191440269
207.57.697785885129537.658333333333331.005151584565340.974306133207522
217.67.600887750608717.691666666666670.9881977573922480.999883204352197
227.77.45901261316727.73750.9640080921702361.03230821548785
237.77.418962923595487.783333333333330.9531858145947091.03788091129431
247.97.729288822107227.808333333333330.98987690357831.02208627233653
258.18.159358353874577.791666666666671.047190376967860.992725119880734
268.28.100087766272967.729166666666671.047989791862811.0123347100192
278.27.866010362328757.654166666666671.027676911790361.04245985223599
288.27.689453224064347.583333333333331.013993831744751.06639571905293
297.97.445921589443427.520833333333330.9900394357154691.06098350689059
307.37.144939000098387.458333333333330.9579806480578831.02170221465844
316.97.496161640899797.38751.014708851560040.920471079806087
326.67.341794698929317.304166666666671.005151584565340.898962756471862
336.77.119141343879997.204166666666670.9881977573922480.941124733498892
346.96.844457454408677.10.9640080921702361.00811496688544
3576.676272309723777.004166666666670.9531858145947091.04848928792265
367.16.850773070181486.920833333333330.98987690357831.03637938773703
377.27.199433841654036.8751.047190376967861.00007863928726
387.17.196196570791296.866666666666671.047989791862810.986632303628039
396.97.043868832896456.854166666666671.027676911790360.979575310626945
4076.912057953060036.816666666666671.013993831744751.01272299039406
416.86.691016519710386.758333333333330.9900394357154691.01628803037156
426.46.418470341987826.70.9579806480578830.99712231404
436.76.75626976997066.658333333333331.014708851560040.991671473773784
446.66.66331737934776.629166666666671.005151584565340.9904976191673
456.46.517987708133046.595833333333330.9881977573922480.981898138901702
466.36.302202902562926.53750.9640080921702360.999650455150846
476.26.15599171925756.458333333333330.9531858145947091.00714885314170
486.56.339336669999366.404166666666670.98987690357831.02534387087548
496.86.71510829230646.41251.047190376967861.01264189704742
506.86.77263402991346.46251.047989791862811.00404066866240
516.46.692745888034756.51251.027676911790360.956259225595564
526.16.616309752134486.5251.013993831744750.921964090032526
535.86.435256332150556.50.9900394357154690.901284999483734
546.16.198933110141226.470833333333330.9579806480578830.984040300422121
557.26.566011860303096.470833333333331.014708851560041.09655604546344
567.36.554425957686466.520833333333331.005151584565341.11375123422352
576.96.542692652067846.620833333333330.9881977573922481.05461166631742
586.16.507054622149096.750.9640080921702360.937444105546074
595.86.561095690460246.883333333333330.9531858145947090.883998690711543
606.26.937387299244587.008333333333330.98987690357830.893708212121172
617.1NA7.1NANA
627.7NA7.16666666666667NANA
637.9NANANANA
647.7NANANANA
657.4NANANANA
667.5NANANANA
678NANANANA
688.1NANANANA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/02/t1259784396ewiujhg40ml5kb2/1atm31259784174.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/02/t1259784396ewiujhg40ml5kb2/1atm31259784174.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/02/t1259784396ewiujhg40ml5kb2/24fnw1259784174.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/02/t1259784396ewiujhg40ml5kb2/24fnw1259784174.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/02/t1259784396ewiujhg40ml5kb2/3wd791259784174.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/02/t1259784396ewiujhg40ml5kb2/3wd791259784174.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/02/t1259784396ewiujhg40ml5kb2/43a7z1259784174.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/02/t1259784396ewiujhg40ml5kb2/43a7z1259784174.ps (open in new window)


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