Re: [R] nlminb supplying NaN parameters to objective function

2015-05-08 Thread Jean Marchal
Prof. Nash, awesome! This sounds promising. Thank you for the explanation, Jean 2015-05-08 14:16 GMT-07:00 Prof J C Nash (U30A) : > Your problem is saying (on my machine) that it cannot compute the > gradient. Since it does this numerically, my guess is that the step to > evaluate the gradient

Re: [R] nlminb supplying NaN parameters to objective function

2015-05-07 Thread Jean Marchal
Thanks for the advice! I will continue to monitor the optimizer behaviour. Jean 2015-05-07 17:03 GMT-07:00 William Dunlap : > Your immediate problem may be solved, but the exact value of that limiting > value > affects the parameter estimates a fair bit. I have not really looked at > your functi

Re: [R] nlminb supplying NaN parameters to objective function

2015-05-07 Thread William Dunlap
Your immediate problem may be solved, but the exact value of that limiting value affects the parameter estimates a fair bit. I have not really looked at your function, but the ledge around it puts a kink (discontinuous first derivative) into it, which can mess up optimizers. Bill Dunlap TIBCO Sof

Re: [R] nlminb supplying NaN parameters to objective function

2015-05-07 Thread Jean Marchal
Yes, indeed! Problem solved! Thanks a lot! Jean 2015-05-07 14:06 GMT-07:00 William Dunlap : > Your nLL function returns 1e+308 in near-boundary cases. Since 1e+308 is so > close to machine infinity, it is easy to get into Inf-Inf (=NaN) or Inf/Inf > (=NaN) > situations when working with it. Tr

Re: [R] nlminb supplying NaN parameters to objective function

2015-05-07 Thread William Dunlap
Your nLL function returns 1e+308 in near-boundary cases. Since 1e+308 is so close to machine infinity, it is easy to get into Inf-Inf (=NaN) or Inf/Inf (=NaN) situations when working with it. Try making that limiting value something smaller, like 1e+30, and you may have better luck. Bill Dunlap

Re: [R] nlminb supplying NaN parameters to objective function

2015-05-07 Thread Jean Marchal
A follow-up to my yesterday's email. I was able to make a reproducible example. All you will have to do is load the .RData file that you can download here: https://drive.google.com/file/d/0B0DKwRjF11x4dG1uRWhwb1pfQ2s/view?usp=sharing and run this line of code: nlminb(start=sv, objective = nLL, l