Home » date » 2010 » Dec » 21 »

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Tue, 21 Dec 2010 19:55:16 +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/21/t1292961198l6y8u634igjwzqs.htm/, Retrieved Tue, 21 Dec 2010 20:53:22 +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/21/t1292961198l6y8u634igjwzqs.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:
KDGP2W102
 
Dataseries X:
» Textbox « » Textfile « » CSV «
13,2 13,8 16,2 14,7 13,9 16,0 14,4 12,3 15,9 15,9 15,5 15,1 14,5 15,1 17,4 16,2 15,6 17,2 14,9 13,8 17,5 16,2 17,5 16,6 16,2 16,6 19,6 15,9 18,0 18,3 16,3 14,9 18,2 18,4 18,5 16,0 17,4 17,2 19,6 17,2 18,3 19,3 18,1 16,2 18,4 20,5 19,0 16,5 18,7 19,0 19,2 20,5 19,3 20,6 20,1 16,1 20,4 19,7 15,6 14,4 13,9 14,3 15,3 14,4 13,8 15,7 14,7 12,5 16,2 16,1 16 15,8 15,2
 
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'George Udny Yule' @ 72.249.76.132


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.357744444336104
betaFALSE
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
213.813.20.600000000000001
316.213.41464666660172.78535333339834
414.714.41109134713800.288908652862034
513.914.51444681262-0.614446812619986
61614.29463187906521.70536812093484
714.414.9047178498775-0.504717849877499
812.314.7241578431266-2.42415784312656
915.913.85692884255422.04307115744576
1015.914.58782619851381.31217380148620
1115.515.05724908599890.442750914001129
1215.115.2156407657075-0.115640765707505
1314.515.1742709242369-0.674270924236872
1415.114.93305424711380.166945752886239
1517.414.99277816271432.40722183728568
1616.215.85394840128780.346051598712179
1715.615.9777464381807-0.377746438180731
1817.215.84260974855381.35739025144618
1914.916.3282085698047-1.42820856980468
2013.815.8172748886038-2.01727488860384
2117.515.09560600450712.40439399549291
2216.215.95576459838980.244235401610236
2317.516.04313845642601.45686154357398
2416.616.56432257980650.0356774201934691
2516.216.577085978669-0.377085978668990
2616.616.44218556476310.157814435236887
2719.616.49864280220523.10135719779485
2815.917.6081361096180-1.70813610961804
291816.99705990623231.00294009376770
3018.317.35585615277960.944143847220374
3116.317.6936183687768-1.39361836877683
3214.917.1950591398222-2.29505913982218
3318.216.3740144831281.82598551687200
3418.417.02725065722711.37274934277286
3518.517.51834410807020.981655891929833
361617.8695260496579-1.86952604965787
3717.417.20071349185110.199286508148855
3817.217.2720071329725-0.0720071329725371
3919.617.24624698119902.35375301880096
4017.218.0882890470144-0.888289047014418
4118.317.77050857548040.529491424519602
4219.317.95993119092591.34006880907410
4318.118.4393333624003-0.339333362400254
4416.218.3179387372237-2.11793873722367
4518.417.56025792053770.839742079462319
4620.517.86067098414062.63932901585943
471918.80487627633940.195123723660643
4816.518.8746807044371-2.37468070443713
4918.718.02515187535260.6748481246474
501918.26657504271580.733424957284157
5119.218.52895374652170.671046253478305
5220.518.76901681559611.73098318440389
5319.319.3882664330558-0.0882664330558178
5420.619.35668960700871.24331039299127
5520.119.80147699268670.298523007313307
5616.119.9082719400595-3.80827194005953
5720.418.54588381098221.85411618901784
5819.719.20918357675690.490816423243079
5915.619.3847704253611-3.78477042536105
6014.418.0307898326005-3.63078983260054
6113.916.7318949414357-2.83189494143569
6214.315.7188002591936-1.41880025919355
6315.315.21123234884440.088767651155564
6414.415.2429884828821-0.842988482882104
6513.814.9414140364917-1.14141403649171
6615.714.53307950624961.16692049375044
6714.714.9505388298707-0.250538829870720
6812.514.860909955394-2.360909955394
6916.214.0163075352742.183692464726
7016.114.79751138266831.30248861733166
711615.26346944932980.736530550670246
7215.815.52695916191580.273040838084155
7315.215.6246380048173-0.424638004817325


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
7415.472726117740012.338230299862018.6072219356179
7515.472726117740012.143689258309518.8017629771704
7615.472726117740011.959905486025618.9855467494543
7715.472726117740011.785270196681419.1601820387985
7815.472726117740011.618539621356919.3269126141231
7915.472726117740011.458728617983219.4867236174967
8015.472726117740011.305041111983719.6404111234962
8115.472726117740011.156822888245919.7886293472340
8215.472726117740011.013528536839419.9319236986405
8315.472726117740010.874697687568920.070754547911
8415.472726117740010.739937529200120.2055147062798
8515.472726117740010.608909694090320.3365425413897
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292961198l6y8u634igjwzqs/10ecb1292961309.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292961198l6y8u634igjwzqs/10ecb1292961309.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292961198l6y8u634igjwzqs/20ecb1292961309.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292961198l6y8u634igjwzqs/20ecb1292961309.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292961198l6y8u634igjwzqs/30ecb1292961309.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292961198l6y8u634igjwzqs/30ecb1292961309.ps (open in new window)


 
Parameters (Session):
par1 = 12 ; par2 = Single ; par3 = additive ;
 
Parameters (R input):
par1 = 12 ; par2 = Single ; par3 = additive ;
 
R code (references can be found in the software module):
par1 <- as.numeric(par1)
if (par2 == 'Single') K <- 1
if (par2 == 'Double') K <- 2
if (par2 == 'Triple') K <- par1
nx <- length(x)
nxmK <- nx - K
x <- ts(x, frequency = par1)
if (par2 == 'Single') fit <- HoltWinters(x, gamma=F, beta=F)
if (par2 == 'Double') fit <- HoltWinters(x, gamma=F)
if (par2 == 'Triple') fit <- HoltWinters(x, seasonal=par3)
fit
myresid <- x - fit$fitted[,'xhat']
bitmap(file='test1.png')
op <- par(mfrow=c(2,1))
plot(fit,ylab='Observed (black) / Fitted (red)',main='Interpolation Fit of Exponential Smoothing')
plot(myresid,ylab='Residuals',main='Interpolation Prediction Errors')
par(op)
dev.off()
bitmap(file='test2.png')
p <- predict(fit, par1, prediction.interval=TRUE)
np <- length(p[,1])
plot(fit,p,ylab='Observed (black) / Fitted (red)',main='Extrapolation Fit of Exponential Smoothing')
dev.off()
bitmap(file='test3.png')
op <- par(mfrow = c(2,2))
acf(as.numeric(myresid),lag.max = nx/2,main='Residual ACF')
spectrum(myresid,main='Residals Periodogram')
cpgram(myresid,main='Residal Cumulative Periodogram')
qqnorm(myresid,main='Residual Normal QQ Plot')
qqline(myresid)
par(op)
dev.off()
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Estimated Parameters of Exponential Smoothing',2,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Parameter',header=TRUE)
a<-table.element(a,'Value',header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'alpha',header=TRUE)
a<-table.element(a,fit$alpha)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'beta',header=TRUE)
a<-table.element(a,fit$beta)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'gamma',header=TRUE)
a<-table.element(a,fit$gamma)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Interpolation Forecasts of Exponential Smoothing',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'t',header=TRUE)
a<-table.element(a,'Observed',header=TRUE)
a<-table.element(a,'Fitted',header=TRUE)
a<-table.element(a,'Residuals',header=TRUE)
a<-table.row.end(a)
for (i in 1:nxmK) {
a<-table.row.start(a)
a<-table.element(a,i+K,header=TRUE)
a<-table.element(a,x[i+K])
a<-table.element(a,fit$fitted[i,'xhat'])
a<-table.element(a,myresid[i])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable1.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Extrapolation Forecasts of Exponential Smoothing',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'t',header=TRUE)
a<-table.element(a,'Forecast',header=TRUE)
a<-table.element(a,'95% Lower Bound',header=TRUE)
a<-table.element(a,'95% Upper Bound',header=TRUE)
a<-table.row.end(a)
for (i in 1:np) {
a<-table.row.start(a)
a<-table.element(a,nx+i,header=TRUE)
a<-table.element(a,p[i,'fit'])
a<-table.element(a,p[i,'lwr'])
a<-table.element(a,p[i,'upr'])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable2.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