::Free Statistics and Forecasting Software::

v1.1.22-r6
 
  Black&White | Blue Theme | Normal Fontsize | Increase Fontsize | Decrease Fontsize | Toggle underline | Secure website (SSL)
 
 
This software module is powered by R

:: Exponential Smoothing - Free Statistics Software (Calculator) ::

All rights reserved. The non-commercial (academic) use of this software is free of charge. The only thing that is asked in return is to cite this software when results are used in publications.

This free online software (calculator) computes the following forecasting models: single (Brown model), double (Brown model), and triple exponential smoothing (Holt-Winters model).

Click here to edit the underlying code of this R Module.

Enter (or paste) your data delimited by hard returns.

Send output to:
Data:
 
Sample Range:
(leave blank to include all observations)
From:
To:
Seasonal period 
Type of Exponential Smoothing (?)
Type of seasonality (?)
Chart options
Width:
Height:

Click here to edit the underlying code of this R Module.






Cite this software as:
Wessa P., (2008), Exponential Smoothing (v1.0.3) in Free Statistics Software (v1.1.22-r6), Office for Research Development and Education, URL http://www.wessa.net/rwasp_exponentialsmoothing.wasp/
The R code is based on :
C. C. Holt (1957), Forecasting seasonals and trends by exponentially weighted moving averages, ONR Research Memorandum, Carnegie Institute 52.
P. R. Winters (1960), Forecasting sales by exponentially weighted moving averages, Management Science 6, 324–342.

Source code of R module
1par1 <- as.numeric(par1)
2if (par2 == "Single") K <- 1
3if (par2 == "Double") K <- 2
4if (par2 == "Triple") K <- par1
5nx <- length(x)
6nxmK <- nx - K
7x <- ts(x, frequency = par1)
8if (par2 == "Single") fit <- HoltWinters(x, gamma=0, beta=0)
9if (par2 == "Double") fit <- HoltWinters(x, gamma=0)
10if (par2 == "Triple") fit <- HoltWinters(x, seasonal=par3)
11fit
12myresid <- x - fit$fitted[,"xhat"]
13bitmap(file="test1.png")
14op <- par(mfrow=c(2,1))
15plot(fit,ylab="Observed (black) / Fitted (red)",main="Interpolation Fit of Exponential Smoothing")
16plot(myresid,ylab="Residuals",main="Interpolation Prediction Errors")
17par(op)
18dev.off()
19bitmap(file="test2.png")
20p <- predict(fit, par1, prediction.interval=TRUE)
21np <- length(p[,1])
22plot(fit,p,ylab="Observed (black) / Fitted (red)",main="Extrapolation Fit of Exponential Smoothing")
23dev.off()
24bitmap(file="test3.png")
25op <- par(mfrow = c(2,2))
26acf(as.numeric(myresid),lag.max = nx/2,main="Residual ACF")
27spectrum(myresid,main="Residals Periodogram")
28cpgram(myresid,main="Residal Cumulative Periodogram")
29qqnorm(myresid,main="Residual Normal QQ Plot")
30qqline(myresid)
31par(op)
32dev.off()
33load(file="createtable")
34a<-table.start()
35a<-table.row.start(a)
36a<-table.element(a,"Estimated Parameters of Exponential Smoothing",2,TRUE)
37a<-table.row.end(a)
38a<-table.row.start(a)
39a<-table.element(a,"Parameter",header=TRUE)
40a<-table.element(a,"Value",header=TRUE)
41a<-table.row.end(a)
42a<-table.row.start(a)
43a<-table.element(a,"alpha",header=TRUE)
44a<-table.element(a,fit$alpha)
45a<-table.row.end(a)
46a<-table.row.start(a)
47a<-table.element(a,"beta",header=TRUE)
48a<-table.element(a,fit$beta)
49a<-table.row.end(a)
50a<-table.row.start(a)
51a<-table.element(a,"gamma",header=TRUE)
52a<-table.element(a,fit$gamma)
53a<-table.row.end(a)
54a<-table.end(a)
55table.save(a,file="mytable.tab")
56a<-table.start()
57a<-table.row.start(a)
58a<-table.element(a,"Interpolation Forecasts of Exponential Smoothing",4,TRUE)
59a<-table.row.end(a)
60a<-table.row.start(a)
61a<-table.element(a,"t",header=TRUE)
62a<-table.element(a,"Observed",header=TRUE)
63a<-table.element(a,"Fitted",header=TRUE)
64a<-table.element(a,"Residuals",header=TRUE)
65a<-table.row.end(a)
66for (i in 1:nxmK) {
67a<-table.row.start(a)
68a<-table.element(a,i+K,header=TRUE)
69a<-table.element(a,x[i+K])
70a<-table.element(a,fit$fitted[i,"xhat"])
71a<-table.element(a,myresid[i])
72a<-table.row.end(a)
73}
74a<-table.end(a)
75table.save(a,file="mytable1.tab")
76a<-table.start()
77a<-table.row.start(a)
78a<-table.element(a,"Extrapolation Forecasts of Exponential Smoothing",4,TRUE)
79a<-table.row.end(a)
80a<-table.row.start(a)
81a<-table.element(a,"t",header=TRUE)
82a<-table.element(a,"Forecast",header=TRUE)
83a<-table.element(a,"95% Lower Bound",header=TRUE)
84a<-table.element(a,"95% Upper Bound",header=TRUE)
85a<-table.row.end(a)
86for (i in 1:np) {
87a<-table.row.start(a)
88a<-table.element(a,nx+i,header=TRUE)
89a<-table.element(a,p[i,"fit"])
90a<-table.element(a,p[i,"lwr"])
91a<-table.element(a,p[i,"upr"])
92a<-table.row.end(a)
93}
94a<-table.end(a)
95table.save(a,file="mytable2.tab")
Delete history
Server DateModuleCommand
Sun, 18 May 2008 01:45:40 -0600Start of session-

Please, send us your feedback!
Overall rating
What do you think about the response time?
Rate the facility with which you interact with our software.
Is the output presented in an understandable (clear) form?
How did you find this website/module?
Do you have any comments about our site?
Do you have any suggestions for our site?
Please enter the code that is displayed in this picture: captcha

To cite Wessa.net in publications use:
Wessa, P. (2008), Free Statistics Software, Office for Research Development and Education,
version 1.1.22-r6, URL http://www.wessa.net/

© Resa R&D, and the 'Office for Research, Development, and Education' - All rights reserved. Academic license for non-commercial use only.
This website is an intellectual and physical property of Resa R&D. This includes: html content, graphical illustrations (gif files), computer software, online or electronic documentation, associated media, and printed materials. The free use of the scientific content, services, and applications in this website is granted for non commercial use only. In any case, the source (url) should always be clearly displayed. Under no circumstances are you allowed to reproduce, copy or redistribute the design, layout, or any content of this website (for commercial use) including any materials contained herein without the express written permission of Resa R&D or the Office for Research, Development, and Education.

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, Resa R&D makes no warranties or representations as to the accuracy or completeness of such information (or software), and it assumes 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 Resa R&D 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.

Software Version : 1.1.22-r6
Algorithms & Software : Prof. dr. P. Wessa
Facilities : Resa R&D - Office for Research, Development, and Education
Server : www.wessa.net

Comments, Feedback & Errors | Privacy Policy | Statistics Resources | Wessa.net Home

 © Wessa.Net 2002-2008  
 
 

Home Page
Equation Plotter
Time Series Analysis (new)
Time Series Analysis (old)
Multiple Regression (new)
Multiple Regression (old)
Descriptive Statistics
Statistical Distributions
Hypothesis Testing

Academic citations
Computations Archive
Search Computations
FAQ
About Wessa.net
Powered by Linux

Server status page
History list
Edit R Code
Google
Web wessa.net