[R] nlme plot

From: R V <villegas.ro_at_gmail.com>
Date: Tue 12 Jul 2005 - 10:01:44 EST


Hello,

I am running this script from Pinheiro & Bates book in R Version 2.1.1 (WinXP). But, I can't plot Figure 2.3.
What's wrong?

TIA.
Rod.



>library(nlme)
> names( Orthodont )

[1] "distance" "age" "Subject" "Sex"
> levels( Orthodont$Sex )

[1] "Male" "Female"
> OrthoFem <- Orthodont[ Orthodont$Sex == "Female", ]
>

> fm1OrthF <- lme( distance ~ age, data = OrthoFem, random = ~ 1 | Subject )
> fm2OrthF <- update( fm1OrthF, random = ~ age | Subject )
> orthLRTsim <- simulate.lme( fm1OrthF, fm2OrthF, nsim = 1000 )
> plot( orthLRTsim, df = c(1, 2) ) # produces Figure 2.3
Error in if ((dfType <- as.double(names(x)[1])) == 1) { :

        argument is of length zero
Execution halted



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Tue Jul 12 10:04:45 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:33:30 EST