My ongoing problems (see here and here) making the nonlinear mixed effects models in Chapter 8 of Pinheiro and Bates converge continue. This time with the Quinidine
dataset (p. 385). Once again this is an iterative model-building exercise. I am having trouble with the third model in the series.
library(nlme)
fm1Quin.nlme <- nlme(conc ~ quinModel(Subject, time, conc, dose, interval, lV, lKa, lCl),
data = Quinidine,
fixed = lV + lKa + lCl ~ 1,
random = pdDiag(lV + lCl ~ 1),
groups = ~ Subject,
start = list(fixed = c(5, -0.3, 2)),
na.action = na.pass, # R does not have the function na.include
naPattern = ~ !is.na(conc))
fm1Quin.fix <- fixef(fm1Quin.nlme)
fm2Quin.nlme <- update(fm1Quin.nlme,
fixed = list(lCl ~ glyco, lKa + lV ~ 1),
start = c(fm1Quin.fix[3], 0, fm1Quin.fix[2:1]))
fm2Quin.fix <- fixef(fm2Quin.nlme)
Now for the troublesome model
fm3Quin.nlme <- update(fm2Quin.nlme,
fixed = list(lCl ~ glyco + Creatinine, lKa + lV ~ 1),
start = c(fm2Quin.fix[1:2], 0.2, fm2Quin.fix[3:4]),
control = nlmeControl(maxIter = 50))
I tried setting the maximum number of iterations higher in nlmeControl
but keep getting similar error messages
Error in nlme.formula(model = conc ~ quinModel(Subject, time, conc, dose, :
maximum number of iterations (maxIter = 50) reached without convergence
In addition: Warning messages:
1: In nlme.formula(model = conc ~ quinModel(Subject, time, conc, dose, :
Singular precision matrix in level -1, block 1
2: In nlme.formula(model = conc ~ quinModel(Subject, time, conc, dose, :
Singular precision matrix in level -1, block 1
3: In nlme.formula(model = conc ~ quinModel(Subject, time, conc, dose, :
Singular precision matrix in level -1, block 1
4: In nlme.formula(model = conc ~ quinModel(Subject, time, conc, dose, :
Singular precision matrix in level -1, block 1
5: In nlme.formula(model = conc ~ quinModel(Subject, time, conc, dose, :
Singular precision matrix in level -1, block 1
6: In nlme.formula(model = conc ~ quinModel(Subject, time, conc, dose, :
Singular precision matrix in level -1, block 1
7: In nlme.formula(model = conc ~ quinModel(Subject, time, conc, dose, :
Singular precision matrix in level -1, block 1
It seems as if there is more finesse required in getting these nonlinear models to converge in R than with the linear mixed-effects models. Any help much appreciated.