R X12 automdl trouble

548 views Asked by At

Does anyone have an idea why I might receive this error:

Error in automdl && is.null(arima) : invalid 'x' type in 'x && y'

When attempting to run the second example in the R package x12?

library(x12)
data(AirPassengers)
x12out <- x12(AirPassengers,x12path="c:\\x12arima\\x12a.exe",transform="auto",
          automdl="TRUE")

Running the first example with the fulling specified ARIMA works.

x12out <- x12(AirPassengers,x12path="c:\\x12arima\\x12a.exe",transform="auto",
          arima=c(0,1,1),sarima=c(0,1,1),regvariables="lpyear",
          sigmalim=c(2.0,3.0),outlier="all",critical=list(LS=3.5,TC=3),
          seasonalma="s3x3")

Clearly the "automdl" is choking for some reason?

1

There are 1 answers

1
flodel On BEST ANSWER

The error message

Error in automdl && is.null(arima) : invalid 'x' type in 'x && y'

is helpful. It shows that when R tried to run x && y, it found that x had an invalid type. It also tells us that x here is automdl. && being a logical operator, automdl should be a logical: TRUE or FALSE.

You made a mistake when setting automdl to "TRUE" (a character); it should be TRUE (a logical).

(I would also agree the function's documentation is confusing.)