Rebecca, I think the problem is that subset is a nume of an R function. If you do something like
subs <- c(rep(TRUE, 107), FALSE) fm2 <- lme(distance ~ age + Sex, data = Orthodont, random = ~ 1, subset=subs) everything works fine. Hope this helps, Andy __________________________________ Andy Jaworski 518-1-01 Process Laboratory 3M Corporate Research Laboratory ----- E-mail: apjawor...@mmm.com Tel: (651) 733-6092 Fax: (651) 736-3122 Rebecca Sela <rs...@stern.nyu.edu> Sent by: r-help-boun...@r-project.org 06/25/2009 10:37 AM To r-help <r-help@r-project.org> cc Subject [R] Problems with subsets in NLME I am trying to estimate models with subsets using the NLME package. However, I am getting an error in the case below (among others): > subset <- c(rep(TRUE, 107), FALSE) > fm2 <- lme(distance ~ age + Sex, data = Orthodont, random = ~ 1, subset=subset) Error in xj[i] : invalid subscript type 'closure' > fm2 <- lme(distance ~ age + Sex, data = Orthodont, random = ~ 1, subset=1:107) The second estimation works. Does anyone know if there is another work-around? (I have also e-mailed the package maintainers, but one of the e-mails bounced, so I am trying this list as well.) Thank you! Rebecca -- Rebecca Sela IOMS/Statistics Group Stern School of Business New York University ______________________________________________ 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. [[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.