8
$\begingroup$

I need to do forecasting of weekly sales using Holt-Winters technique. My data have max 92 weeks of information. I'm planning to consider 72 weeks of data for training & 20 weeks of data for validation & I have only available s/w to do the forecast is R. I'm preparing my training & validation data set using following command

data_ts_s = ts(data$SUM.SALES_UNITS.[c(1:72)], frequency=52)
data_ts_c = ts(data$SUM.SALES_UNITS.[c(73:92)], frequency=52)

But for doing forecast using HW, R needs at least 2 periods of data. Can you please help me how to do the forecasting with Holt-Winters technique without 104 weeks of data.

$\endgroup$

1 Answer 1

12
$\begingroup$

The Holt-Winters method is a poor choice for weekly data. It involves estimating a parameter for each week so the model has far too many degrees of freedom.

One approach which should work ok is to use a TBATS model which uses Fourier terms for the seasonality, and so requires fewer coefficients. In your case:

library(forecast)
fit <- tbats(data_ts_s)
fc <- forecast(fit, h=20)

The TBATS model is a generalization of the Holt-Winters approach.

$\endgroup$
1
  • $\begingroup$ Just to underline that your picture of seasonality is based on one annual cycle, pretty much, so don't expect too much. $\endgroup$
    – Nick Cox
    Commented Nov 12, 2013 at 13:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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