I have a situation where my AR(2) model has a lower AIC value (-98.49) than both the AR(1) (-75.84) and the AR(3) model (-92.91). As you can see, the difference in AIC between the AR(2) and the AR(3) is 5.58.
However, as I understand it, from the definition of the AIC, -2*LogLik+2*npar, it follows that the absolute difference in AIC between an AR(p) and AR(p+1) model can never be >2, since this would imply that the log-likelihood would have decreased after adding a parameter.
I have checked to confirm; the log-likelihood as computed by the TSA package (
is in fact higher for the AR(2), (52.25), than for the AR(3), (50.45).
I have also confirmed that R isn't calculating the AICc, since this would only add 1.2 to the AIC (I have 24 observations).
So my question is: am I missing something? Can the log-likelihood actually decrease when adding a parameter, is there something special about how the TSA package calculates AIC, am I doing something wrong in R, or is R pulling my leg somehow?
EDIT: The code and data I have been using are the following:
my_vector <- c(-0.15117448, -0.14348934, -0.18137095, -0.19605340, -0.20543727, -0.21709754, -0.21490577, -0.20853185, -0.19525812, -0.14138660, -0.12247660, -0.07981194, -0.01453317, 0.05647378, 0.11952508, 0.20328388, 0.26107555, 0.30314216, 0.29448029, 0.28686523, 0.22518196, 0.14278947, 0.07233569, 0.06609976)
my_timeseries <- ts(my_vector, frequency = 1) ar2 <- arima(my_timeseries, order = c(2, 0, 0), method = "ML") ar3 <- arima(my_timeseries, order = c(3, 0, 0), method = "ML") ar2$loglik ar3$loglik