A particular series (std), seems to exhibit a trend-like behavior. According to the ADF test for this series:
Dickey-Fuller = -2.8618, Lag order = 6, p-value = 0.2131
Therefore, I am taking the first difference of std with this code
Here is the tricky part, the acf and pacf suggest that this would be an ARMA process (2,1), with a d=1. But the code shows both different estimates and different AIC values, when (I think) this shouldn't be the case:
For std with no difference:
> arima(std, order=c(2,1,1)) Call: arima(x = std, order = c(2, 1, 1)) Coefficients: ar1 ar2 ma1 0.5206 0.2697 -0.7638 s.e. 0.1218 0.0552 0.1153 sigma^2 estimated as 0.06355: log likelihood = -13.3, aic = 34.6
And, for the differenced std (stddif):
> arima(stddif, order=c(2,0,1)) Call: arima(x = stddif, order = c(2, 0, 1)) Coefficients: ar1 ar2 ma1 intercept 0.5188 0.2695 -0.7620 -0.0003 s.e. 0.1223 0.0554 0.1159 0.0157 sigma^2 estimated as 0.06355: log likelihood = -13.3, aic = 36.6
The values for the AR1, AR2, MA1 as well as the AIC are different. Why is this?
This was all done in R, the relevant package is 'tseries'.