Re: [R] nlme plot

From: Douglas Bates <dmbates_at_gmail.com>
Date: Tue 12 Jul 2005 - 12:05:04 EST

On 7/11/05, R V <villegas.ro@gmail.com> wrote:
> 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?

There was a change in the way that R handles assignments of names of components and that affected the construction of this plot. I've rewritten the plot construction code (the logic in the current version was bizarre) and will upload a new version of nlme after I test this out.

By the way, there is a simpler way of reproducing the examples in our book. Use

source(system.file("scripts/ch02.R", package = "nlme"))

but don't try that with the current version of the nlme package. There is another "infelicity" (to use Bill Venables' term) that I will correct.

>
>
> 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
>



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 12:09:03 2005

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