5

I am trying to forecast with an arimax model including the xtransf argument. I used the example given in chapter 11 of the book Time Series Analysis With Applications in R, Jonathan D. Cryer & Kung-Sik Chan, 2nd ed.

So this is basically an intervention Model. I just did not include the xreg argument, so the Additive outliers are not included for the moment. Here are the codes and the Error I got.

>library(TSA)
>data(airmiles)
 >air.m1=arimax(log(airmiles),order=c(0,1,1),seasonal=list(order=c(0,1,1),period=12),xtransf=data.frame(I911=1*(seq(airmiles)==69),
I911=1*(seq(airmiles)==69)),transfer=list(c(0,0),c(1,0)),method="ML")
> air.m1

Call:
arimax(x = log(airmiles), order = c(0, 1, 1), seasonal = list(order = c(0, 1, 
    1), period = 12), method = "ML", xtransf = data.frame(I911 = 1 * (seq(airmiles) == 
    69), I911 = 1 * (seq(airmiles) == 69)), transfer = list(c(0, 0), c(1, 0)))

Coefficients:
          ma1     sma1  I911-MA0  I911.1-AR1  I911.1-MA0
      -0.5379  -0.7644   -0.1290      0.8901     -0.2419
s.e.   0.0854   0.1532    0.0606      0.1239      0.0513

sigma^2 estimated as 0.0009739:  log likelihood = 199.42,  aic = -388.84

>predict(air.m1,n.ahead=20)
Error in dim(data) <- dim : attempt to set an attribute on NULL

Any idea where my mistake is?

gung - Reinstate Monica
  • 132,789
  • 81
  • 357
  • 650
Stat
  • 7,078
  • 1
  • 24
  • 49

1 Answers1

6

The TSA package provides no predict method for arimax models. Strange but true.

Rob Hyndman
  • 51,928
  • 23
  • 126
  • 178
  • 2
    I will send this to the author of TSA package. BTW, your "forecast" package is really helpful. Thanks. – Stat Aug 11 '12 at 18:09