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?
Thanks, 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
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html