R: Error in tseries::garch() Function for Auto GARCH Model Detection

17 views Asked by At

I am trying to obtain the best GARCH model for a simulated series.

# simulate a time series.
tts <- arima.sim(100, model = list(ar = c(-.8), order = c(1, 0, 0)))

# obtain best `GARCH` model for the seies.
tseries::garch(tts, order = c(1, 1), grad = "numerical", trace = FALSE)

Problem

I got this error:

Error in if (object$p != 0 || object$q != 0) { : missing value where TRUE/FALSE needed

What I Want

  1. How do I fix this error?
  2. Is there alternative method to obtain auto-garch model other than what I demonstrated above?
0

There are 0 answers