Skip to content
Back to formatted view

Raw Message

Message-ID: <Pine.LNX.4.44.0405230723490.5356-100000@gannet.stats>
Date: 2004-05-23T08:27:25Z
From: Brian Ripley
Subject: arima problems when using argument fixed=
In-Reply-To: <4095246E.13614.13386CE@localhost>

I don't see your point here.   If you fix a value, it is fixed and the 
initial value you give is irrelevant.  That is stated quite clearly

   fixed: optional numeric vector of the same length as the total
          number of parameters.  If supplied, only 'NA' entries in
          'fixed' will be varied. 

It looks like you have misread that.


On Sun, 2 May 2004 kjetil@acelerate.com wrote:

> As I am reading ?arima, only NA entries in the argument fixed= 
> imports. The following seems to indicate otherwise:

What does `imports' mean?  That's not on the help page.

> 
> 
> 
>  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

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595