Home » date » 2009 » Dec » 03 »

Exponential smoothing

*The author of this computation has been verified*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Thu, 03 Dec 2009 09:44:51 -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/t1259858780sqqnkuffm6gymzp.htm/, Retrieved Thu, 03 Dec 2009 17:46:24 +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/t1259858780sqqnkuffm6gymzp.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 «
8.4 8.4 8.4 8.6 8.9 8.8 8.3 7.5 7.2 7.4 8.8 9.3 9.3 8.7 8.2 8.3 8.5 8.6 8.5 8.2 8.1 7.9 8.6 8.7 8.7 8.5 8.4 8.5 8.7 8.7 8.6 8.5 8.3 8 8.2 8.1 8.1 8 7.9 7.9 8 8 7.9 8 7.7 7.2 7.5 7.3 7 7 7 7.2 7.3 7.1 6.8 6.4 6.1 6.5 7.7 7.9 7.5 6.9 6.6 6.9 7.7 8 8 7.7 7.3 7.4 8.1 8.3 8.2
 
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


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha1
beta0
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
139.39.4006281885072-0.100628188507207
148.78.672696165550660.0273038344493415
158.28.14617848814480.0538215118552028
168.38.254020752915980.0459792470840252
178.58.49868078676950.00131921323049866
188.68.64507808414717-0.045078084147173
198.58.43089317979460.0691068202054073
208.27.645072103548580.554927896451415
218.17.87765860278460.222341397215402
227.98.35547852570824-0.455478525708243
238.69.4390561812499-0.839056181249903
248.79.12829638060467-0.428296380604673
258.78.71244853084964-0.0124485308496372
268.58.113915337705840.386084662294159
278.47.959159232863620.440840767136384
288.58.455072529953570.0449274700464297
298.78.70319974235725-0.00319974235724807
308.78.84822534501423-0.148225345014229
318.68.528797957133770.0712020428662257
328.57.734897014275110.765102985724888
338.38.165516169550180.134483830449824
3488.56154363891267-0.561543638912672
358.29.5583892456576-1.35838924565759
368.18.70430345736025-0.604303457360253
378.18.11244853084964-0.0124485308496372
3887.555134509861030.444865490138973
397.97.491611094660660.408388905339338
407.97.95244308735959-0.0524430873595847
4188.089642875594-0.0896428755940075
4288.13720993197953-0.137209931979534
437.97.84346451575950.0565354842405066
4487.106122639189420.893877360810585
457.77.685753558274210.0142464417257875
467.27.94334829929938-0.743348299299385
477.58.60372473039606-1.10372473039606
487.37.96231584168252-0.662315841682517
4977.31244853084964-0.312448530849637
5076.530702992145530.469297007854468
5176.556514818254750.443485181745245
527.27.047710090690410.152289909309589
537.37.3738265310369-0.073826531036894
547.17.42619451894484-0.326194518944841
556.86.96232151970685-0.162321519706847
566.46.11804862119760.281951378802395
576.16.15051320219113-0.0505132021911283
586.56.294827393663950.205172606336047
597.77.76839327954222-0.0683932795422235
607.98.17431230330473-0.274312303304727
617.57.91244853084964-0.412448530849637
626.96.99635368201621-0.0963536820162112
636.66.463005190614160.136994809385835
646.96.645606536615220.254393463384778
657.77.067048097655270.632951902344727
6687.832489040678950.167510959321048
6787.84346451575950.156535484240506
687.77.195947549915940.504052450084058
697.37.39789599150863-0.0978959915086346
707.47.53121807289053-0.131218072890525
718.18.84239085921145-0.742390859211447
728.38.59830522654915-0.298305226549147
738.28.31244853084964-0.112448530849639


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
747.648264647835166.816249874747068.48027942092327
757.1627046765716.023602294656438.30180705848557
767.211270412475055.795824870737158.62671595421294
777.385351595979095.715832462154519.05487072980367
787.512889233613765.623985752833569.40179271439396
797.366559804533865.33868949313749.39443011593032
806.626960459832534.624404605836738.62951631382834
816.368287487922434.27438639406088.46218858178405
826.571250851514284.258974352489028.88352735053955
837.85341910407084.971398547669710.7354396604719
848.336933839346025.1707679575419611.5030997211501
858.34938237019565-76.194320788434592.8930855288258
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/03/t1259858780sqqnkuffm6gymzp/1x0ua1259858688.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/03/t1259858780sqqnkuffm6gymzp/1x0ua1259858688.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/03/t1259858780sqqnkuffm6gymzp/28c551259858688.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/03/t1259858780sqqnkuffm6gymzp/28c551259858688.ps (open in new window)


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


 
Parameters (Session):
par1 = 12 ; par2 = Triple ; par3 = multiplicative ;
 
Parameters (R input):
par1 = 12 ; par2 = Triple ; par3 = multiplicative ;
 
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=0, beta=0)
if (par2 == 'Double') fit <- HoltWinters(x, gamma=0)
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