Re: [R] [optim/bbmle] function returns NA

2013-08-14 Thread Ravi Varadhan
Carlos, There are likely several problems with your likelihood. You should check it carefully first before you do any optimization. It seems to me that you have box constraints on the parameters. They way you are enforcing them is not correct. I would prefer to use an optimization algorithm t

Re: [R] [optim/bbmle] function returns NA at

2013-08-13 Thread Prof J C Nash (U30A)
chine$double.xmax, say that number *1e-6 to avoid computation troubles) often works, but it is a quick and dirty fix. JN On 13-08-13 06:00 AM, r-help-requ...@r-project.org wrote: Message: 36 Date: Tue, 13 Aug 2013 10:38:05 +0200 From: Carlos Nasher To:r-help@r-project.org Subject: [R] [optim/bbmle] fun

[R] [optim/bbmle] function returns NA at ... distance from x

2013-08-13 Thread Carlos Nasher
Dear R helpers, I try to find the model parameters using mle2 (bbmle package). As I try to optimize the likelihood function the following error message occurs: Error in grad.default(objectivefunction, coef) : function returns NA at 1e-040.001013016911639890.0003166929388711890.00093516359482939