On Oct 20, 2013, at 9:54 PM, Mark Leeds <marklee...@gmail.com> wrote:
> Bill: I didn't look at the code but I think the OP means that during the > nlminb algorithm, > the variance covariance parameters hit values such that the covariance matrix > estimate becomes negative definite. Yes, that is what I meant. > > Again, I didn't look at the details but one way to deal with this is to have > the likelihood > function return -Inf whenever the covariance matrix becomes not positive > definite. so, the > likelihood should check for positive definiteness first before it actually > calculates anything. > If PD is not true, the -Inf value should push nlminb towards values that > obtain a positive definite matrix. But there could be something more subtle > going on that I'm not understanding. I don't know even what algorithm nlminb > is using ( probably quasi-newton ) but this is one thing the OP could try. I tried this at your suggestion. nlminb() seems to hang at -Inf, but Inf works splendidly. Thanks much! ______________________________________________ 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.