# Best practices for regression when using seasonal data? [closed]

I have a variable $$y$$ that I would like to model using a set of independent variables $$X$$. Both $$y$$ and $$X$$ are monthly measurements (~10 years in total) and appear to be subject to seasonal variability. Theory and initial analysis suggest that multicollinearity and interaction effects are also present in my $$X$$.

Right now all I want to do is to explore the relationship between $$y$$ and the variables in $$X$$, but in the future, I probably will need to forecast future values of $$y$$. Initially, I just used the data as is in an OLS fit, only standardising them to z-scores because my theory suggested that I didn't need an intercept.

My colleagues said that this approach was naive and that there would be no way of differentiating genuine relationships from the seasonal cycle. To that end, I performed a seasonal adjustment on each variable by fitting and removing 12 dummy variables. However, I now find that my seasonally adjusted $$X$$ and $$y$$ fit very poorly compared to my previous model ($$R^2$$ with holdout data drops from 0.7 to 0.3).

Is there any way to effectively deal with seasonal variation without directly estimating & removing the seasonality in this way? Because of the seasonal cycle, I think that this could be described as an autoregressive process, so I guess I could try adding lagged variables but I am unsure of what to do next. What I don't understand is the following:

1. If all my variables have a similar seasonal cycle (i.e. peak in summer, the trough in winter, though exact maxima & minima vary within 1-3 months), do I need to explicitly account for seasonality at all?
2. If my fits with seasonally adjusted data are so poor, does this mean that my data is unusable and/or my theory is incorrect?
3. As an autoregressive process, should I include both lagged $$y$$ and $$X$$ terms in my fits, as they all have seasonal variability? Most examples I've read online seem to be concerned with lags in $$y$$ only.
4. For this problem should I be using $$ARIMA$$, $$ARIMAX$$, or something else entirely?

Some suggestions.

If all my variables have a similar seasonal cycle (i.e. peak in summer, trough in winter, though exact maxima & minima vary within 1-3 months), do I need to explicitly account for seasonality at all?

Not necessarily, no.

Consider a simple hypothetical data generating process where "variables have a similar seasonal cycle". Suppose $$X_t$$ follows a seasonal AR process, $$(1 - \phi L^{12}) X_t = \epsilon_t, \;\; |\phi|<1$$ This is an SARIMA(0,0,0)$$\times$$(1,0,0)$$_{12}$$ process. What happens this January $$X_t$$ depends on what happened previous January $$X_{t-12}$$ plus a random shock $$\epsilon_t$$. Suppose $$y_t = \beta X_t + u_t$$, where $$u_t$$ is independent of $$\epsilon_t$$.

If you regress $$y_t$$ on $$X_t$$, your OLS $$\hat{\beta}$$ estimates $$\beta$$ just fine. ($$\hat{\beta}$$ is consistent if $$E[u_t X_t] = 0$$, and this condition holds here).

In fact, if you take the residuals $$\hat{\epsilon}_t$$ and $$\hat{u}_t$$ obtained from de-seasonalizing $$X_t$$ and $$y_t$$ respectively, and regress $$\hat{u}_t$$ on $$\hat{\epsilon}_t$$, the $$R^2$$ will be much smaller than the $$R^2$$ from just regressing $$y_t$$ on $$X_t$$. The $$\hat{\beta}$$ from the residuals regression would be close to zero in large sample.

This would be similar to the $$R^2$$ result you're describing. In your case, seasonality is modeled additively via seasonal dummies while SARMA models multiplicative seasonality. But the same discussion would apply verbatim.

If my fits with seasonally adjusted data are so poor, does this mean that my data is unusable and/or my theory is incorrect?

No. As the above example shows, if the seasonality of the dependent variable $$y_t$$ derives from that of $$X_t$$, de-seasonalizing removes the correlation between the two---the opposite of what you're trying to do.

As an autoregressive process, should I include both lagged y and X terms in my fits, as they all have seasonal variability? Most examples I've read online seem to be concerned with lags in y only.

Check whether the residuals from regressing $$y_t$$ on $$X_t$$ is white---in particular whether it has serial correlation. Presence of serial correlation would indicate you're missing lagged $$y_t$$ variables in the regression.

If the true model is $$y_t = \beta X_t + \gamma y_{t-1} + u_t$$ and $$y_{t-1}$$ is omitted from your regression, the residuals would have serial correlation. Adding the lag $$y_{t-1}$$ would improve forecast (subject to usual considerations such as model stability/in-sample fit vs out-of-sample forecast/etc).

For this problem should I be using ARIMA, ARIMAX, or something else entirely?

The model $$y_t = \beta X_t + \gamma y_{t-1} + u_t$$ is already one example of ARMAX.

• Thank you very much Michael! – Electronic Ant Jun 16 at 8:05