I received this email today:

I have a question about the ets() function in R, which I am trying to use for Holt-Winters exponential smoothing.

My problem is that I am getting very different estimates of the alpha, beta and gamma parameters using ets() compared to HoltWinters(), and I can’t figure out why.

This is a common question, so I thought the answer might be of sufficient interest to post here.

There are several issues involved.

`HoltWinters()`

and `ets()`

are optimizing different criterion. `HoltWinters()`

is using heuristic values for the initial states and then estimating the smoothing parameters by optimizing the MSE. `ets()`

is estimating both the initial states and smoothing parameters by optimizing the likelihood function (which is only equivalent to optimizing the MSE for the linear additive models).
- The two functions use different optimization routines and different starting values. That wouldn’t matter if the surfaces being optimized were smooth, but they are not. Because the MSE and likelihood surfaces are both fairly bumpy, it is easy to find a local optimum. The only way to avoid this problem is to use a much slower computational method such as PSO.
`ets()`

searches over a restricted parameter space to ensure the resulting model is forecastable. `HoltWinters()`

ignores this issue (it was written before the problem was even discovered). See this paper for details (equivalently chapter 10 of my exponential smoothing book).

I have experimented with many different choices of the starting values for the initial values and smoothing parameters, and what is implemented in `ets()`

seems about as good as is possible without using a much slower optimization routine. Where there is a difference between `ets()`

and `HoltWinters()`

, the results from `ets()`

are usually more reliable.

A related question on estimation of ARIMA models was discussed at http://robjhyndman.com/researchtips/estimation/.

*Related*

To

**leave a comment** for the author, please follow the link and comment on their blog:

** Research tips » R**.

R-bloggers.com offers

**daily e-mail updates** about

R news and

tutorials on topics such as:

Data science,

Big Data, R jobs, visualization (

ggplot2,

Boxplots,

maps,

animation), programming (

RStudio,

Sweave,

LaTeX,

SQL,

Eclipse,

git,

hadoop,

Web Scraping) statistics (

regression,

PCA,

time series,

trading) and more...

If you got this far, why not

__subscribe for updates__ from the site? Choose your flavor:

e-mail,

twitter,

RSS, or

facebook...

**Tags:** computing, R, Research tips