'AR(2) model with and without mean
I am fitting a time series data by AR(2). After I subtracted the mean of the whole dataset, I expect the command include.mean = T and include.mean = F to give the same zero intercept. However, it seems its not the case. Could anyone explain why?
The following is the code:
sspar2 <- arima(ssp-mean(ssp$X101), order=c(2,0,0), include.mean = F, method = "ML")
with output
Call:
arima(x = ssp - mean(ssp$X101), order = c(2, 0, 0), include.mean = F, method = "ML")
Coefficients:
ar1 ar2
1.3998 -0.7094
s.e. 0.0707 0.0701
sigma^2 estimated as 227.1: log likelihood = -410.29, aic = 826.59
and
sspar2 <- arima(ssp-mean(ssp$X101), order=c(2,0,0), include.mean = T, method = "ML")
sspar2
with output
Call:
arima(x = ssp - mean(ssp$X101), order = c(2, 0, 0), include.mean = T, method = "ML")
Coefficients:
ar1 ar2 intercept
1.3999 -0.7092 1.1877
s.e. 0.0706 0.0701 4.9039
sigma^2 estimated as 227: log likelihood = -410.26, aic = 828.53
Solution 1:[1]
From R documentation, include.mean definition is "Should the ARMA model include a mean/intercept term? The default is TRUE for undifferenced series, and it is ignored for ARIMA models with differencing." You have an undifferenced series as your d=0 in Arima(p,d,q). Therefore you have an intercept term unless you specify otherwise.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | SCallan |
