[Rd] arima problems when using argument fixed=
kjetil at acelerate.com
kjetil at acelerate.com
Sun May 2 22:40:14 CEST 2004
As I am reading ?arima, only NA entries in the argument fixed=
imports. The following seems to indicate otherwise:
x <- arima.sim(model=list(ar=0.8), n=100) + (1:100)/50
> t <- 1:100
> mod1 <- lm(x ~ t)
>
> init1 <- c(0, coef(mod1)[2])
> fixed1 <- c(as.numeric(NA), 0)
>
> arima(x, order=c(1,0,0), xreg=t, include.mean=FALSE, init=init1,
fixed=fixed1)
Call:
arima(x = x, order = c(1, 0, 0), xreg = t, include.mean = FALSE,
fixed = fixed1,
init = init1)
Coefficients:
ar1 t
0.9281 0
s.e. 0.0357 0
sigma^2 estimated as 0.9186: log likelihood = -138.64, aic = 281.28
>
> init2 <- init1
> init2[2] <- 0
>
> fixed2 <- init1
> fixed2[1] <- as.numeric(NA)
>
> arima(x, order=c(1,0,0), xreg=t, include.mean=FALSE, init=init2,
fixed=fixed2)
Call:
arima(x = x, order = c(1, 0, 0), xreg = t, include.mean = FALSE,
fixed = fixed2,
init = init2)
Coefficients:
ar1 t
0.7888 0.0377
s.e. 0.0593 0.0000
sigma^2 estimated as 0.8452: log likelihood = -133.97, aic = 271.94
>
> fixed1
[1] NA 0
> fixed2
t
NA 0.03767406
> arima(x, order=c(1,0,0), xreg=t, include.mean=FALSE, init=init2,
fixed=fixed1)
Call:
arima(x = x, order = c(1, 0, 0), xreg = t, include.mean = FALSE,
fixed = fixed1,
init = init2)
Coefficients:
ar1 t
0.9281 0
s.e. 0.0357 0
sigma^2 estimated as 0.9186: log likelihood = -138.64, aic = 281.28
Kjetil Halvorsen
More information about the R-devel
mailing list