On Jul 10, 2010, at 11:39 PM, Jun Shen wrote:
Hi, everyone,
I wrote a function, which includes an nlme estimation. The problem is
sometimes nlme may not converge due to too many random effects.
Say a, b are two parameters. if I specify random effects by:
random = a+b~1,
nlme fails to converge.
Then I have to constrain the random effects in a positive definite
diagonal
matrix by:
random = list(pdDiag(a+b~1))
My question is how I can restart nlme within my function. If random
= a+b~1
fails, it won't quit and will go back to try random = list(pdDiag(a
+b~1))
automatically. Currently I just have to do this manually. Thanks a
lot.
?try
--
David Winsemius, MD
West Hartford, CT
______________________________________________
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.