I'm doing a regression analysis with non stationary time series. If I run the regression the residuals are auto correlated and non stationary. If i add a lag of the dependent variable (the estimated coefficient is about 0.75 so the dynamic is stable), residuals become well behaved and i have a really high R^2. It's ok to proceed in this way or it's still a spourious regression?Standard errors are still valid?
-
$\begingroup$ Please register &/or merge your accounts (you can find information on how to do this in the My Account section of our help center), then you will be able to edit & comment on your own question. $\endgroup$– gung - Reinstate MonicaCommented Mar 11, 2019 at 20:42
2 Answers
There are different types of nonstationarity. Have you performed stationarity tests (e.g. Augmented Dickey-Fuller or KPSS) that reveal a unit root? If there is a unit root, estimate the model in first-differences. If there the series is $I(0)$ and there is a deterministic trend, then include $t$ as a regressor. I am assuming, based on the way you have written your question, that you are working with a univariate time series.
-
1$\begingroup$ Unfortunately there may be one or more shifts in the mean or 1 or more time trend changes ... Only the data knows for sure and the analyst needs to be aware of the assumptions underlying his tests. $\endgroup$ Commented Mar 12, 2019 at 20:53
Standard regression models assume that the error terms are independent (or at least uncorrelated) so they tend to perform badly with time-series data that contains substantial amounts of auto-correlation. So if you feed in a time-series with autocorrelation, it is unsurprising that you get residuals that exhibit auto-correlation (in contradiction to the standard regression assumptions).
By putting a lagged dependent variable ito your regression, you are turning your regression into a crude time-series model. (The crude version is roughly equivalent to giving you the partial MLE of the corresponding time-series model, ignoring the effect of the autocorrelation on the process variance; this part gets a bit complex, so I won't labour this point.) When you do this, your fit is generally going to improve because your model is now taking the auto-correlation into account, although somewhat imperfectly. This second model is better than your first, so it is okay to use it, but you should note that using standard regression with a lagged dependent variable is somewhat of a crude approximation to the corresponding time-series model.
On last thing to be careful of here is to note that whenever you add more parameters to a model, and optimise by estimating these parameters, you increase the possibility of overfitting your data. It is probably not too much of an issue here, but adding lagged terms based on observing autocorrelation in residuals (as opposed to pre-specifying a time-series model) comes with a possible danger of overfitting. If you want to explore this then you can try comparing model predictions on your training data versus test data (if you have any of the latter available).
-
$\begingroup$ autocorrelation of residuals is not an issue, usually. the estimates stay unbiased and the variance can be corrected. $\endgroup$– AksakalCommented Jul 2, 2023 at 21:02