6
$\begingroup$

Rob J Hyndman has two posts here and here on forecasting weekly series. He suggests using a regression with ARIMA errors,

$$ y_t = a + \sum_{k=1}^K (\alpha_k \ \text{sin}(2\pi k t/m)+\beta_k \ \text{cos}(2\pi k t/m)) + N_t $$

where $N_t$ is an ARIMA process, $m=365.25/7$ is the seasonal period and $K$ can be selected using AIC. (Subscripts $k$ to $\alpha$ and $\beta$ were not included in the blog post, but I think they are needed.)

The model seems to imply a complicated form of seasonality (rather than additive seasonality -- which I would consider simple). On the other hand, if the seasonality was additive and constant (not changing over time) and there were no deterministic time trends, then a more reasonable approach would seem to be

Stage 1: estimate

$$ y_t = a + \sum_{k=1}^K (\alpha_k \ \text{sin}(2\pi k t/m)+\beta_k \ \text{cos}(2\pi k t/m)) + \varepsilon_t $$

where $\varepsilon_t$ is the error term (in Stage 1 we do not put any structure on it), then obtain fitted values $\tilde{y}_t$.

Stage 2: model $\tilde{y}_t$ as an ARIMA process.
Stage 2: model the residuals $\hat{\varepsilon}_t$ as an ARIMA process.

Stage 1 and Stage 2 could be done sequentially without loss of efficiency as the Fourier terms are deterministic and will be (asymptotically) uncorrelated with other regressors. (The argument works fine for linear regressions, but perhaps not in the context of ARIMA models -- I am not sure.)

Questions:

  1. Am I wrong at some point?
  2. When would Rob J Hyndman's approach be preferred to the two-stage approach?

(My main interest here is actually seasonal adjustment rather than forecasting.)

$\endgroup$
  • 1
    $\begingroup$ See Fit a sinusoidal term to data for a derivation. This can be a much more parsimonious way of modelling deterministic seasonal effects than having one coefficient to estimate per "season". $\endgroup$ – Scortchi Oct 20 '15 at 12:29
10
$\begingroup$

First, the model involves additive seasonality. It is not complicated -- just a simple Fourier approximation to the seasonal term. Yes, the original post missed the subscripts on the coefficients; the post has been subsequently edited.

In stage 1 of your proposal, you ignore the autocorrelation in the residuals which means the coefficients are poorly estimated. It is much better to take the autocorrelation into account. Further, the AIC will be wrong if you do not take the autocorrelated errors into account.

In stage 2, you fit an ARIMA model to the fitted values. This makes little sense. The fitted values will be purely periodic. You need the ARIMA process on the residuals.

You are wrong to say that stages 1 and 2 can be done sequentially. The correlated errors matter. Just because the Fourier terms are deterministic and possibly uncorrelated with other regressors does not make the estimation efficient.

$\endgroup$
  • $\begingroup$ Thank you! Of course, stage 2 was about residuals, not fitted values (a mistake in writing, not in understanding). I also appreciate the argument in the last paragraph. Thanks again! $\endgroup$ – Richard Hardy Oct 20 '15 at 11:55

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.