I have been working through Mixed-Effects Models in S and S-Plus by Pinhiero and Bates and am discovering a lot of problems making the models in the book work.
The latest is this, using a constant plus power function to model heteroscedastic within-group error in the Theo
dataset, (p.393). The error comes at the end of a model-building exercise. The first three models work in R but the last does not
library(nlme)
fm1Theo.nlme <- nlme( model = conc ~ SSfol(Dose, Time, lKe, lKa, lCl),
data = Theoph,
fixed = lKe + lKa + lCl ~ 1,
random = lKe + lKa + lCl ~ 1)
fm2Theo.nlme <- update(fm1Theo.nlme, random = pdDiag(list(lKe ~ 1, lKa ~ 1, lCl ~ 1)))
fm3Theo.nlme <- update(fm2Theo.nlme, random = pdDiag(list(lKa ~ 1, lCl ~ 1)))
fm4Theo.nlme <- update(fm3Theo.nlme, weights = varConstPower(power=0.1))
...yielding the error message
Error in eigen(val, only.values = TRUE) :
infinite or missing values in 'x'
In addition: Warning messages:
1: In nlminb(c(coef(nlmeSt)), function(nlmePars) -logLik(nlmeSt, nlmePars), :
NA/NaN function evaluation
2: In nlminb(c(coef(nlmeSt)), function(nlmePars) -logLik(nlmeSt, nlmePars), :
NA/NaN function evaluation
3: In nlminb(c(coef(nlmeSt)), function(nlmePars) -logLik(nlmeSt, nlmePars), :
NA/NaN function evaluation
4: In nlminb(c(coef(nlmeSt)), function(nlmePars) -logLik(nlmeSt, nlmePars), :
NA/NaN function evaluation
Can anyone shed some light on this message, and how I might make it work?