Home » date » 2010 » Nov » 30 »

Holt-Winters model

*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: Tue, 30 Nov 2010 19:51:51 +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/Nov/30/t1291146639u81jk3ro71ieadw.htm/, Retrieved Tue, 30 Nov 2010 20:50:43 +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/Nov/30/t1291146639u81jk3ro71ieadw.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 «
0,96 0,95 0,95 0,96 0,96 0,96 0,95 0,96 0,96 0,96 0,95 0,95 0,96 0,96 0,96 0,96 0,96 0,95 0,95 0,95 0,95 0,95 0,95 0,95 0,95 0,95 0,95 0,96 0,96 0,96 0,97 0,97 0,97 0,96 0,95 0,95 0,95 0,95 0,95 0,95 0,95 0,95 0,95 0,95 0,95 0,95 0,94 0,94 0,94 0,93 0,93 0,93 0,93 0,92 0,93
 
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
alpha0.839082605513062
beta0
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
130.960.960080128205128-8.01282051284824e-05
140.960.96018771919682-0.000187719196819036
150.960.960621699125539-0.00062169912553911
160.960.960691534044928-0.000691534044928499
170.960.960286105031534-0.000286105031534145
180.950.9498041977843830.000195802215617435
190.950.948059983859120.00194001614087991
200.950.959029309498839-0.00902930949883884
210.950.950377798133395-0.00037779813339478
220.950.949402286132760.000597713867240279
230.950.9396619759499940.0103380240500064
240.950.9485112572805550.00148874271944510
250.950.959922366553357-0.00992236655335677
260.950.951754193285682-0.00175419328568227
270.950.95080393713506-0.000803937135060995
280.960.9507096216573250.0092903783426751
290.960.958745082278610.00125491772139119
300.960.9496337676767330.0103662323232674
310.970.9567040591056670.0132959408943334
320.970.97543678837430-0.00543678837430095
330.970.971191877661696-0.00119187766169615
340.960.969690262538792-0.00969026253879213
350.950.9528848756439-0.00288487564390072
360.950.9492150485520650.000784951447935223
370.950.958199372838646-0.0081993728386458
380.950.952791334786346-0.00279133478634563
390.950.951123743986915-0.00112374398691517
400.950.95238543508847-0.00238543508847089
410.950.9493308783677850.000669121632214997
420.950.9411942014631880.00880579853681185
430.950.9474266011147140.00257339888528552
440.950.954147809911136-0.00414780991113584
450.950.951667538577556-0.00166753857755586
460.950.9483992667022620.00160073329773802
470.940.942163063140325-0.00216306314032488
480.940.9396894353785170.000310564621482934
490.940.946829975875315-0.00682997587531498
500.930.94344122238765-0.0134412223876503
510.930.93310584051781-0.0031058405178106
520.930.932501360853135-0.00250136085313446
530.930.9298410641485940.000158935851406139
540.920.92258563207701-0.00258563207700990
550.930.9182567789352440.0117432210647556


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
560.9315906666107840.9203647798924640.942816553329105
570.9329898692252330.9183356377280130.947644100722454
580.9316467217590360.9142262605442540.949067182973817
590.9234617104147090.9036577098820570.94326571094736
600.9232011210429350.9012711323229460.945131109762924
610.9289320349959850.905064685469480.952799384522492
620.9302103308982960.9045514856089610.95586917618763
630.9328163876522880.9054832153200550.960149559984521
640.9349152360342650.9060045411635920.963825930904937
650.9347818757259570.9043753921070530.965188359344862
660.9269514346260330.8951193719497270.958783497302339
670.9270979020979020.8939014236342180.960294380561586
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/30/t1291146639u81jk3ro71ieadw/1df5e1291146708.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t1291146639u81jk3ro71ieadw/1df5e1291146708.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t1291146639u81jk3ro71ieadw/26o4h1291146708.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t1291146639u81jk3ro71ieadw/26o4h1291146708.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t1291146639u81jk3ro71ieadw/36o4h1291146708.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t1291146639u81jk3ro71ieadw/36o4h1291146708.ps (open in new window)


 
Parameters (Session):
par1 = 12 ; par2 = Triple ; 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