Hi,

I am using Rstan with the optimizing command to fit a somewhat complex cognitive multilevel model to reaction-time data. I found elsewhere on the forums some helpful advice on how to set the hessian and draws arguments in order to estimate standard deviations for MLE parameters in my constrained parameter space (for a model stored as variable f) with a line of code such as:

optimizing_sd_mle = sqrt(diag(cov(f$theta_tilde)))

Unfortunately, once optimizing returns (otherwise successfully) I get no samples returned (such that f$theta_tilde is just a vector) and an error along the following lines:

“error in chol.default(-H): The leading minor of order 109 is not positive definite”

It seems odd that the search should have terminiated but (I guess) left me with second derivatives that don’t imply a local maximum (or something along those lines). I wonder if anyone has any suggestions for things I might pursue here? Is making the tolerances lower likely to help (and if so, which should I adjust?) Any thoughts welcome.