I am using time series modelling to remove the time series error of a linear regression model. Based on the ACF and PACF plot I used AR(1), MA(1) and ARMA(1,0,1) for the different models.But the Ljung box statistics shows mostly significant values. How do i interpret if the model is okay? Does the Ljung box statistics have to have all non significant values for the model to be correct. Or is it like if the Ljung box statistics values are not significant upto lag 10 the model can be considered. My aim is not to forecast but just to remove the time series error and obtain correct coefficients. Thanks in advance.
I think you need to first check whether the series is stationary before model fitting and looking at the Ljung box test. The stationarity check will help to tell you whether you need to do de-trending or differencing to your data. After that you can do the ACF, PACF and ARMA, ARIMA fit and make sure the Ljung box is not significant at least for all lower orders