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.

Jun Shen

	[[alternative HTML version deleted]]

