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 06:33:46 -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/t12598472619khg0oezoew9snf.htm/, Retrieved Thu, 03 Dec 2009 14:34:25 +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/t12598472619khg0oezoew9snf.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:
JSSHWWS9P10
 
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


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha1
beta0
gamma0.428593928188172


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
1310.310.3771634615385-0.077163461538472
1410.210.2079399766900-0.00793997668997548
159.69.60377331002331-0.00377331002331083
169.29.187106643356640.0128933566433567
179.39.282939976689980.0170600233100231
189.49.399606643356640.000393356643355602
199.49.40793997668998-0.00793997668997726
209.29.34960664335664-0.149606643356645
2198.832939976689980.167060023310022
2298.803773310023310.196226689976690
2399.08293997668998-0.0829399766899783
249.810.0871066433566-0.287106643356640
25109.999606643356650.000393356643353826
269.89.90793997668997-0.107939976689973
279.39.203773310023310.0962266899766906
2898.887106643356640.112893356643356
2999.08293997668998-0.0829399766899783
309.19.099606643356640.000393356643357379
319.19.10793997668998-0.00793997668997548
329.19.049606643356640.0503933566433563
339.28.732939976689980.467060023310021
348.89.00377331002331-0.203773310023308
358.38.88293997668998-0.582939976689978
368.49.38710664335664-0.987106643356642
378.18.59960664335665-0.499606643356646
387.78.00793997668997-0.307939976689974
397.97.103773310023310.796226689976692
407.97.487106643356640.412893356643358
4187.982939976689980.0170600233100213
427.98.09960664335664-0.199606643356642
437.67.90793997668997-0.307939976689975
447.17.54960664335664-0.449606643356643
456.86.732939976689980.067060023310022
466.56.60377331002331-0.103773310023309
476.96.582939976689980.317060023310023
488.27.987106643356640.212893356643360
498.78.399606643356640.300393356643355
508.38.60793997668997-0.307939976689973
517.97.703773310023310.196226689976691
527.57.487106643356640.0128933566433576
537.87.582939976689980.217060023310022
548.37.899606643356640.400393356643360
558.48.307939976689980.0920600233100242
568.28.34960664335664-0.149606643356645
577.77.83293997668998-0.132939976689978
587.27.50377331002331-0.303773310023311
597.37.282939976689980.0170600233100222
608.18.38710664335664-0.287106643356639


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
618.299606643356657.723614767536168.87559851917713
628.207546620046627.392971097444579.02212214264867
637.611319930069936.613672736401948.60896712373791
647.198426573426576.04644282178568.35041032506754
657.281366550116555.993409561294328.56932353893877
667.380973193473195.970087001724478.79185938522191
677.388913170163165.864981909548568.91284443077777
687.338519813519815.70936876831578.96767085872391
696.971459790209795.243484162748328.69943541767125
706.77523310023314.953786858887498.5966793415787
716.858173076923074.947824142533548.76852201131261
727.945279720279715.949985332943749.94057410761569
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/03/t12598472619khg0oezoew9snf/1b5961259847224.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/03/t12598472619khg0oezoew9snf/1b5961259847224.ps (open in new window)


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


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


 
Parameters (Session):
par1 = 12 ; par2 = Single ; par3 = additive ;
 
Parameters (R input):
par1 = 12 ; par2 = Triple ; 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=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