[R-sig-ME] nested random effects in nlme
Michael Li
wuolong at gmail.com
Wed Apr 21 17:12:07 CEST 2010
I'm trying to fit a four-parameter logistic model using nlme with
nested random effects. I use something like:
fits <- nlme (y ~ SSfpl (x, A, B, xmid, scal),
random = A + xmid ~ 1,
group = ~ subject / plate,
fixed = A + B + xmid + scal ~ 1,
data = mydata,
start = c(A = 600, B = 5, xmid = 10, scal = 1))
However, I kept getting the error
Error in names(reSt) <- namGrp :
'names' attribute [2] must be the same length as the vector [1]
I look into the code nlme.formula() and there is an assignment
names (reSt) <- namGrp,
which is causing the trouble when namGrp has length of 2 instead of 1.
Did I do something wrong? How do you use nested random effects in nlme?
Best, Michael
More information about the R-sig-mixed-models
mailing list