# Arima stationary vs non-stationary

I am fitting an ARIMA model to data that is non-stationary. I know that I should set $d=1$ in the model, but when I do not, the model still fits the data very well. I am just curious why the ARIMA fits well to the non-stationary data when it is not differenced. Thank-you very much for any help!

The code for the two models is:

arima.stat=Arima(all.data.final[,1],xreg = as.matrix(all.data.final[,c(2,4,5,6,9)]),order=c(1,1,2))

arima.nonstat=Arima(all.data.final[,1],xreg = as.matrix(all.data.final[,c(2,4,5,6,9)]),order=c(1,0,2))


The data is shown below, the blue line is from the ARIMA with differencing, and the red line is the ARIMA without (they greatly overlap):

Actually, it is often very difficult to distinguish between AR(1), I(1) and trend-stationary processes. For instance, Google the debate about whether GDP is I(1) or trend-stationary.

The latter is something like: $x_t=x_0+ct+\varepsilon_t$

Take its first diff: $\Delta x_t=c+\varepsilon_t-\varepsilon_{t-1}$

Doesn't this look like a random walk, i.e. I(1) process to you?

The same with AR(1): $x_t=\phi_1 x_{t-1}+c+\varepsilon_t$. So, if you estimate ARIMA(1,0,0) on a process which is truly ARIMA(0,1,0), you'll get a very good fit, but your $\phi_1$ is probably going to be very close to 1. Converse is true for a AR(1) process estimated by I(1) when $\phi_1\approx 1$.

If you know for sure that the process is I(1) or ARIMA(0,1,0), then estimate it with d=1. Otherwise, you'll have to study your data closer to understand whether it has a unit root or not.

• Thank-you, for this thorough response! I actually simulated the data (it is for a before-after comparison, and I am simulating a linear "impact" to the data, the first half is what the original data looks like). Therefore, if I understand you correctly, I believe my data would actually be "trend stationary", which means I should use the ARIMA (1,0,2) and not difference it. Is that correct? Thank-you again for your help! – Hannah Oct 1 '15 at 23:30
• @Hannah, no, if your data is trend-stationary then you should regress the data on time. Estimating AR(1) or I(1) will be a misspecification. – Aksakal Oct 2 '15 at 2:40
• Sorry, one last follow-up. In the case of my data, I am using an ARIMA with external regressors. In this case, wouldn't it be appropriate to add time as a regressor variable, but still model the correlated residuals using an arima structure? Again, thank-you, I appreciate your patience. – Hannah Oct 2 '15 at 3:01
• There are two different approaches: arima and regarima. The latter would be closer to what you describe, i.e. regression with arima errors. – Aksakal Oct 2 '15 at 3:57