1
$\begingroup$

I am trying to use the Holt-Winters model to forecast the daily pollution rates of some cities. I have almost 4 years of daily data available and would like to make a prediction for the next 180 days.

For simplicity, I'll make a quick time series with rnorm() to elaborate my problem.

myts <- ts(rnorm(1461), start=2016, frequency = 365)

(from what I've read on the internet, this is how you make a daily time series with ts().)

enter image description here

Training dataset: traints <- window(myts, end=c(2019, 181))

I tried to fit a Holt-Winters additive model by:

fit1 <- hw(traints, seasonal='additive')

but it gave an error:

Error in ets(x, "AAA", alpha = alpha, beta = beta, gamma = gamma, phi = phi,  : 
  Frequency too high

When searching around it seems that ets() has a frequency limit of 24. I've read that Holt-Winters can be used for daily data so how would I work around this frequency limit to make a model(other than switching to ARIMA models)?

$\endgroup$

1 Answer 1

0
$\begingroup$

The problem with using Holt-Winters for your data is that you need to estimate 365 initial states for the seasonality component. This will overfit hopelessly. So don't use smoothing with such long periods.

Rob Hyndman's suggestion is to model the seasonality using Fourier terms, and possibly using ARIMA for residuals. auto.arima() will happily do this for you.

$\endgroup$
3
  • $\begingroup$ Yes thankyou, I'll look into that. Also, what type of data does Holt-Winters models usually use to make forecasts? (monthly? weekly?) $\endgroup$
    – Frost
    Jul 6, 2021 at 12:21
  • $\begingroup$ Holt-Winters is really made for shorter seasonal periods. You could use it for daily time series - as long as your seasonality is the weekly one, with a period of 7 days. It's commonly used for monthly or quarterly series, where periods are of length 12 or 4. $\endgroup$ Jul 6, 2021 at 12:31
  • $\begingroup$ I see. Thankyou $\endgroup$
    – Frost
    Jul 6, 2021 at 12:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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