Without the data / script, I'm guessing that it is likely an attempt to evaluate the loss function at an inadmissible point e.g., at the constraint where there is a log(0). Different optimization tools handle things differently, and there are a couple of us working (very slowly due to other things) on trying to provide a nice wrapper to catch these exceptions so that they can be handled better.
JN
Message: 56 Date: Sun, 6 Dec 2009 17:32:54 -0800 (PST) From: Steven <ytste...@gmail.com> Subject: Re: [R] optim with constraints To: r-help@r-project.org Message-ID: <88d5c01d-c30c-4e91-900c-2b825d5e3...@z4g2000prh.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1 Hi, Prof Nash Thanks for your comment! I modified my code to be (added an extra parametr): optim(c(1.14,0.25,0.06), weibull.like, mydata=mydata, method="L-BFGS- B", hessian = TRUE, lower = c(0, 0, 0), upper = c(Inf, Inf, 1)) But I had the following error: Error in optim(c(1.14, 0.25, 0.06), weibull.like, mydata = mydata, method = "L-BFGS-B", : non-finite finite-difference value [2] What does that mean? Much appreciate your help! Steven
______________________________________________ R-help@r-project.org mailing list 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.