I would not say it is fully "solved" since in using Nelder-Mead you did not get the Hessian.
The issue is almost certainly that there is an implicit bound due to log() or sqrt() where a parameter gets to be near zero and the finite difference approximation of derivatives steps over the cliff. Probably some NM steps are doing the same, but returning a large function value which will allow NM to "work", but possibly make it inefficient. JN On 15-02-12 06:00 AM, r-help-requ...@r-project.org wrote: > Message: 30 > Date: Wed, 11 Feb 2015 08:10:03 -0700 > From: Albert Shuxiang Li <albert.shuxiang...@gmail.com> > To: r-help@r-project.org > Subject: [R] Problem Solved: optim fails when using arima > Message-ID: > <canko1dkhubongy0zdtnvgxxmvfi8c+d3z-akykva5tnkrp7...@mail.gmail.com> > Content-Type: text/plain; charset="UTF-8" > > I am using arima(x, order=c(p,0,q)) function for my project, which deals > with a set of large differenced time series data, data size varies from > 8000 to 70000. I checked their stationarity before applying arima. > Occasionally, arima(x, order=c(p,0,q)) gives me error like following (which > stops script running): > > Error in optim(init[mask], armafn, method = optim.method, Hessian = TRUE, : > non-finite finite-difference value [16] > > The last [16] would change anyting from 1 to 16. Using argument > method="CSS", or "ML", or default did not help. I am using the newest R > version 3.1.2 for windows 7. > > I have done a lot of research on internet for this Error Message, and tried > a lot of suggested solutions too. But the results are negative. Then, > finally, I used following line which solved my problem. > > arima(x, order=c(p,0,q), optim.method="Nelder-Mead") > > Hope this helps others with similar situations. > > Shuxiang Albert Li > > [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.