From: Spencer Graves <spencer.graves_at_pdf.com>

Date: Fri 08 Jul 2005 - 12:46:01 EST

>>Consider the following extension of an example in "?lme":

*>>
*

*>>fm2 <- lme(distance ~ age + Sex, data = Orthodont, random = ~ 1)
*

*>>int <- intervals(fm2)
*

*>>class(int$fixed)
*

*>>kf <- dim(int$fixed)[1]
*

*>>plot(int$fixed[,2], kf:1,
*

*>>xlab="x", ylab="", xlim=range(int$fixed),
*

*>>axes=FALSE)
*

*>>axis(1)
*

*>>axis(2, kf:1, dimnames(int$fixed)[[1]])
*

*>>segments(int$fixed[,1], kf:1,
*

*>>int$fixed[,3], kf:1)
*

*>>abline(v=0)
*

*>>
*

*>>However, we are mixing units, i.e., the units for the intercept are
*

*>>"distance", while for "age" are "distance/time", and the interpretation
*

*>>of the coefficient of a factor like Sex depends on contrasts used.
*

*>>Thus, I don't know how much sense it makes to prepare plots like this.
*

*>>
*

*>>For similar plots that make more sense, see Pinheiro and Bates (2000
*

*>>Mixed-Effects Models in S and S-PLUS (Springer).
*

*>>
*

*>>spencer graves
*

*>>
*

*>>Ghislain Vieilledent wrote:
*

*>>
*

*>>
*

*>>>Hello and sorry to disturb.
*

*>>>
*

*>>>I'm trying to plot the confidence intervals for the fixed effects of a
*

*>>
*

*>>lme.
*

*>>
*

*>>>I want to obtain graphically, if it is possible, a bar with Estimate,
*

*>>
*

*>>upper
*

*>>
*

*>>>and lower CI for each level of the factors.
*

*>>>
*

*>>>I know how to do for a lm model but for a lme one, I tried with
*

*>>>plot(intervals(...)) and plot(ci(...)) from the gmodels package but it
*

*>>>doesn't work well.
*

*>>>
*

*>>>Thanks for you help and have a good day.
*

*>>>
*

*>>
*

*>>--
*

*>>Spencer Graves, PhD
*

*>>Senior Development Engineer
*

*>>PDF Solutions, Inc.
*

*>>333 West San Carlos Street Suite 700
*

*>>San Jose, CA 95110, USA
*

*>>
*

*>>spencer.graves@pdf.com
*

*>>www.pdf.com <http://www.pdf.com> <http://www.pdf.com>
*

*>>Tel: 408-938-4420
*

*>>Fax: 408-280-7915
*

*>>
*

Date: Fri 08 Jul 2005 - 12:46:01 EST

Have you considered the examples with "?TukeyHDS"? This may not work with a standard "lme" object. However, I suspect that I could probably get something useful from this for an "lme" by walking through the code line by line.

spencer graves

Ghislain Vieilledent wrote:

> ---------- Forwarded message ---------- > From: Ghislain Vieilledent <ghislainv@gmail.com> > Date: 7 juil. 2005 11:38 > Subject: Re: [R] Plotting confidence intervals for lme > To: Spencer Graves <spencer.graves@pdf.com> > > That's what I was looking for. Thanks a lot! > > That's true units are mixing and that values of coef depend on the contrasts > but I want to use this graph in order to compare levels' coefficient of each > of the factor taken independantly, not to compare factors' coefficients to > eachothers. Does it mean something? > > Thanks again. > > Ghislain Vieilledent. > > > > 2005/7/6, Spencer Graves <spencer.graves@pdf.com>: >

>>Consider the following extension of an example in "?lme":

> > > >

-- Spencer Graves, PhD Senior Development Engineer PDF Solutions, Inc. 333 West San Carlos Street Suite 700 San Jose, CA 95110, USA spencer.graves@pdf.com www.pdf.com <http://www.pdf.com> Tel: 408-938-4420 Fax: 408-280-7915 ______________________________________________ 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.htmlReceived on Fri Jul 08 12:50:52 2005

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