1
$\begingroup$

I am using HoltWintersto fit the exponential model on the data. The data shows trend as well as seasonal pattern.Getting the following error message:

holt_output<-HoltWinters(data)

Error in HoltWinters(data) : optimization failure

Not able to figure it out, why getting the above error.Would appreciate any kind of help.Thanks in advance.

$\endgroup$
4
$\begingroup$

The internal optimization in HoltWinters() ran into a numerical problem. That happens. I suggest you try ets() from the forecast package, which will also fit exponential smoothing models, albeit in a state space framework.

ets() will (attempt to) automatically choose the best model form, but if you insist on having an additive level-and-trend model, you can call ets(y=data,model="AAN"). See ?ets.

$\endgroup$
  • $\begingroup$ thanks for the response. The reason why I am using HoltWinters() is that, it is giving better result that ets() ( MAPE is less ). Is there a way to get the same model in ets() suggested by HoltWinters() ? $\endgroup$ – Arushi Nov 24 '14 at 4:56
  • $\begingroup$ You can't get the exact same model, but the difference should usually be minor. If the MAPE (out-of-sample, right? in-sample goodness of fit is no indicator of forecasting performance) differs systematically by a nontrivial amount between ets(data,model="AAN") and HoltWinters(data), then something is strange. $\endgroup$ – S. Kolassa - Reinstate Monica Nov 24 '14 at 7:58

Not the answer you're looking for? Browse other questions tagged or ask your own question.