On 17 June 2012 17:58, Claudio Tablada <[email protected]> wrote:
> Thank you for his response. I attach the program in c for details.

As I suspected; you're not checking your domains...  The optimiser
doesn't know that your functions are only defined for positive values
and is naively passing it negative values.

You need to put a couple of lines into your code when this isn't the
case; i.e. return GSL_NAN from the likelihood function and an
"appropriate error code" for derivatives (NaN also works for me, but
not sure what this is supposed to be and the manual doesn't make it
clear what appropriate is!).

Hope that helps,

  Sam


Reply via email to