[R] Bug in arima?
Richard A. Bilonick
rab at nauticom.net
Wed Apr 30 14:48:20 CEST 2003
I'm using the fixed argument in arima. Shouldn't ar4, ar5, and ar6
display as zero in the output?
arima(x = window(log(hhprice), start = c(1990, 1), end = c(2003, 3)),
order = c(7,
1, 0), xreg = window(ts.union(exa1 = lag(exa, -1), exa12 = lag(exa,
-12), exb1 = lag(exb, -1), exc1 = lag(exc, -1), exc12 = lag(exc,
-12)), start = c(1990, 1), end = c(2003, 3)), include.mean = FALSE,
fixed = c(NA,
NA, NA, 0, 0, 0, NA, NA, NA, NA, NA, NA))
ar1 ar2 ar3 ar4 ar5 ar6 ar7
exa1 exa12 exb1 exc1 exc12
0.0922 -0.1279 -0.2661 -0.0577 -0.0277 0.02 -0.2167
-0.3015 0.3424 0.0281 0.0519 0.1715
s.e. 0.0789 0.0801 0.0742 0.0000 0.0000 0.00 0.0853
0.0503 0.0515 0.0295 0.0257 0.0329
Also, is the documentation wrong?
fixed: optional numeric vector of the same length as the total
number of parameters. If supplied, only non-`NA' entries in
`fixed' will be varied. `transform.pars = TRUE' will be
overridden if any AR parameters are fixed.
The non-NA entries in my fixed argument are zeroes. Aren't these "fixed"
to zero so they don't vary when a call is made to optim? I thought that
was the purpose of the argument. I only wan ar1, ar2, ar3, and ar7 in
the model so I'm setting ar4, ar5, and ar6 to zero.
My main concern is that the predict.Arima function works correctly when
using the fixed argument. I'm assuming, output display notwithstanding,
that ar4-ar6 are actually fixed to zero when using fixed. When I try to
manually make the forecast, the result is slightly different than what
predict.Arima reports. I'm wondering if that is due to these
coefficients not being set to zero?
More information about the R-help