[R] optim error in arima

Vaidotas Zemlys mpiktas at gmail.com
Tue Sep 28 06:48:22 CEST 2004


Hi,


On Mon, 27 Sep 2004 09:02:39 -0700 (PDT), Nathaniel B. Derby
<nderby at u.washington.edu> wrote:
> Hello,
> 
> I'm fitting a series of ARIMA models to a data set to compare fits.  After 
> taking the logs of the data and then differencing them to induce stationarity,
> I execute
> 
> arima( y, order=c( p, 0, q ), seasonal=list( order=c( P, 0, Q ), period=7 ) )
> 
> for various values of p, q, P and Q.  For one set of these values, I get
> 
> Error in optim(init[mask], armafn, method = "BFGS", hessian = TRUE ... :
>          non-finite finite-difference value [0]
> 
> which tells me that when computing derivatives of the objective function 
> (armafn) by finite differencing, one of the values is NA, +Inf or -Inf.  Any 
> ideas?  I would like to print some values of armafn, but how do I get that 
> from my data set, and what would I look for?

This probably means, that for your values of p, q, P, Q the arima
model is not valid arima model, i.e. it is not stationary.

Vaidotas




More information about the R-help mailing list