Solved – Understanding the violation of the independence assumption in regression analysis of time series

assumptionsautocorrelationregressiontime series

I am studying time series using regression analysis. I know that when using time series data the assumption that the errors are independent cannot be satisfied.

However, analysing the residual plot:

enter image description here

In my opinion, it does not have a positive autocorrelation because I cannot see a cyclic pattern. Also, it does not show a negative autocorrelation.

I think that there is a random pattern and it indicates that there is no autocorrelation or little autocorrelation.

I did a Durbin-Watson test to confirm the above ideas and the value for the test is 2.349. It is greater than 2 but very close to 2, so I assumed that there is no autocorrelation.

Additionally I checked that the p-values for the coefficients are very small, less than 5%. It means that they are all significant.
enter image description here

Also, the value for the F-test and p-values shows that the model is significant

All these, show that autocorrelation is not a problem in this case and that the assumption that the errors are independent are not being violated. However I am confused because I am using time series data where I used dummy variables for seasonality and according to what I read this assumption is not satisfied when using time series but in my case I think that there is no autocorrelation.

Can anyone help me on this?

I edited my question to add the following plots of the ACF and PACF:

enter image description here

Best Answer

The ACF/PACF results that you have added paint a much clearer picture of what is going on.

First, Durbin-Watson is a test of no autocorrelation against the alternative of AR(1) structure. If you look at your ACF/PACF, it's true, you don't see anything special at lag 1. However, it looks like you have something at lag 4.

Second, the fitted versus residual plot has no time structure whatsoever; the points are ordered by fitted value, not time. There is no autocorrelation information in this plot, whether it exists in the data or not.

Plots like ACF and PACF are a much better tool to diagnose autocorrelation, as well as more appropriate tests like Ljung-Box. What you can see in these particular plots is some kind of autocorrelation at lag 4, which is consistent with seasonality in a quarterly series. If the ACF/PACF you have shown are the raw series, then you probably expected this and that's why you included seasonal dummies. If the ACF/PACF are for the residuals, then your fixed seasonal dummies are not sufficient to take care of the seasonality.