[R] optim() and ARIMA

nashjc at uottawa.ca nashjc at uottawa.ca
Tue Jan 27 16:45:19 CET 2009


dhabby wrote:
    Last week I run in to a lot a problems triyng to fit an ARIMA model to a
    time series. The problem is that the internal process of the arima
function
    call function "optim" to estimate the model parameters, so far so good...
    but my data presents a problem with the default method "BFGS" of the
optim
    function, the output error looks like this:

Error en optim(init[mask], armafn, method = "BFGS", hessian = TRUE, control
= optim.control,  :
  non-finite finite-difference value [7]

I don't know much about the calls from ARIMA to optim, but when I modified
Fletcher's 1970 VM method (called BFGS in R), I was aiming to make it
extremely robust to messy functions. (I had machinery with only 6 hex
digits for floating point and no guard digits. Furthermore, only 8K bytes
for program AND data. This was 1975/6.) However, BFGS needs gradients, and
it is clear there's some sort of trouble approximating them with finite
differences.

Changing optimization methods might succeed on this occasion, but your
problem is more likely bad scaling or some setup where your ARIMA model
essentially is not sensible. Can you duplicate the message on a small
example problem?

John Nash




More information about the R-help mailing list