JPV
JPV

Reputation: 1079

Arima structure in R

I have a doubt using arima function in R. If I have a set of data, x1, and I want to figure out which is the best Arima model:

> arima(diff(x1),order=c(1,0,1))
Series: diff(x1) 
ARIMA(1,0,1) with non-zero mean 

Coefficients:
      ar1      ma1  intercept
    0.3835  -1.0000      3e-03
s.e.  0.1082   0.0339      6e-04

sigma^2 estimated as 0.005576:  log likelihood=88.75
AIC=-169.5   AICc=-168.95   BIC=-160.13

> arima(x1,order=c(1,1,1))
Series: x1 
ARIMA(1,1,1)                    

Coefficients:
     ar1      ma1
  0.4238  -0.8984
s.e.  0.1202   0.0489

sigma^2 estimated as 0.006367:  log likelihood=84.98
AIC=-163.96   AICc=-163.63   BIC=-156.93

Why do I get different values??

Upvotes: 2

Views: 399

Answers (1)

Jilber Urbina
Jilber Urbina

Reputation: 61164

For your results to be equal just remove the mean by doing:

> arima(diff(x11), order = c(1,0,1), include.mean=FALSE)
> arima(x1, order = c(1,1,1))

For a detailed explanation see this site.

Upvotes: 2

Related Questions