[R] Problems with subsets in NLME

Rebecca Sela rsela at stern.nyu.edu
Thu Jun 25 17:35:44 CEST 2009


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




More information about the R-help mailing list