[R] arima on defined lags

Gad Abraham gabraham at csse.unimelb.edu.au
Fri Apr 10 00:42:16 CEST 2009


Gerard M. Keogh wrote:
> 
> Dear all,
> 
> The standard call to ARIMA in the base package such as
> 
>       arima(y,c(5,0,0),include.mean=FALSE)
> 
>       gives a full 5th order lag polynomial model with for example coeffs
> 
>       Coefficients:
>                ar1    ar2      ar3     ar4      ar5
>             0.4715  0.067  -0.1772  0.0256  -0.2550
>       s.e.  0.1421  0.158   0.1569  0.1602   0.1469
> 
> 
> Is it possible (I doubt it but am just checking) to define a more
> parsimonous lag1 and lag 5 model with coeff ar1 and ar5?
> Or do I need one of the other TS packages?

You can specify the "fixed" argument (with transform.pars=FALSE):

 > arima(x, c(5, 0, 0), fixed=c(NA, 0, 0, 0, NA), include.mean=FALSE, 
transform.pars=FALSE)

Call:
arima(x = x, order = c(5, 0, 0), include.mean = FALSE, transform.pars = 
FALSE,
     fixed = c(NA, 0, 0, 0, NA))

Coefficients:
           ar1  ar2  ar3  ar4     ar5
       -0.0483    0    0    0  0.1355
s.e.   0.1010    0    0    0  0.1031


-- 
Gad Abraham
Dept. CSSE and NICTA
The University of Melbourne
Parkville 3010, Victoria, Australia
email: gabraham at csse.unimelb.edu.au
web: http://www.csse.unimelb.edu.au/~gabraham




More information about the R-help mailing list