Dear all, Probably a very stupid question. I am trying to reproduce the example of Pinheiro & Bates pp.278--287 on R 3.0.2 (Windows).
I'd like to run : ### mod.nls <- nls(conc ~ SSbiexp(time, A1, lrc1, A2, lrc2), data=Indometh) mod.lis <- nlsList(conc ~ SSbiexp(time, A1, lrc1, A2, lrc2), data=Indometh) mod1 <- nlme(model=mod.lis, data=Indometh, random = pdDiag(A1 + lrc1 + A2 + lrc2 ~ 1)) >mod1 Nonlinear mixed-effects model fit by maximum likelihood Model: conc ~ SSbiexp(time, A1, lrc1, A2, lrc2) Data: Indometh Log-likelihood: 54.59671 Fixed: list(A1 ~ 1, lrc1 ~ 1, A2 ~ 1, lrc2 ~ 1) A1 lrc1 A2 lrc2 2.8275372 0.7736221 0.4614716 -1.3441022 Random effects: Formula: list(A1 ~ 1, lrc1 ~ 1, A2 ~ 1, lrc2 ~ 1) Level: Subject Structure: Diagonal A1 lrc1 A2 lrc2 Residual StdDev: 0.5714106 0.1580778 0.1115978 7.3195e-06 0.08149341 Number of Observations: 66 Number of Groups: 6 ### which works well. But I'd like to directly specify the model with nlme, not going through "nls" or "nlsList" (please don't ask why...). Below the result. I don't get what I am missing? ### >mod2 <- nlme(model=conc ~ SSbiexp(time, A1, lrc1, A2, lrc2), data=Indometh, +fixed = A1+lrc1+A2+lrc2~1, +random = pdDiag(A1 + lrc1 + A2 + lrc2 ~ 1)) Error in nlme.formula(model = conc ~ SSbiexp(time, A1, lrc1, A2, lrc2), : subscript out of bounds ### [[alternative HTML version deleted]] ______________________________________________ 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.