The model has multiple levels of random effects, so you need to tell qqnorm.lme which one you're interested in.
e.g. qqnorm(m1, ~ranef(., level=1)) hth, Kingsford Jones On Thu, Apr 23, 2009 at 11:03 AM, Patrick Zimmerman <patz...@gmail.com> wrote: > Hello, > > I am trying to do some plotting to check random effect assumptions for a > model I fit using lme. > > I want to use qqnorm and pairs (similarly to examples given in Pinheiro & > Bates p. 188), but it's not working. Here's some relevant code and the > error message: > > library(nlme) > data(Machines) > m1 <- lme(fixed=score~Machine,random=~1|Worker/Machine, data=Machines) > qqnorm(m1, ~ranef(.)) > > Error in rep(names(fData), rep(nr, nc)) : invalid 'times' argument > In addition: Warning message: > In data.frame(Worker = list("(Intercept)" = c(-7.51429457896346, : > row names were found from a short variable and have been discarded > > I also tried changing the last line to qqnorm(m1, form=~ranef(.)) > > Any advice? > > Thanks, > Pat Zimmerman > > [[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. > ______________________________________________ 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.