Re: [R] [R-sig-ME] Post hoc tests with lme

From: Gang Chen <gangchen6_at_gmail.com>
Date: Thu, 17 Apr 2008 11:41:50 -0400

Thanks for the suggestion, Somon! I did try glht from multcomp package, but the problem is that for the hypothesis

H0: TypeT1 =0 and TypeT2 = 0

it gives results for two separate hypotheses H01: TypeT1 =0 and H02: TypeT2 = 0, not exactly one statistic for the original hypothesis H0. So my question is, how can I get only one statistic for H0? Any more suggestions?

Thanks,
Gang

> library(nlme)
> fm <- lme(effort~Type-1, data=ergoStool, random=~1|Subject)
> library(multcomp)
> summary(glht(fm, linfct=c("TypeT1=0", "TypeT2=0")))

         Simultaneous Tests for General Linear Hypotheses

Fit: lme.formula(fixed = effort ~ Type - 1, data = ergoStool, random = ~1 |

    Subject)

Linear Hypotheses:

            Estimate Std. Error z value p value
TypeT1 == 0    8.556      0.576   14.85  <1e-10 ***
TypeT2 == 0   12.444      0.576   21.60  <1e-10 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Adjusted p values reported -- single-step method)


On 4/16/08, Simon Blomberg <s.blomberg1_at_uq.edu.au> wrote:

> Try glht in package multcomp.
>
> Simon.
>
>
> On Wed, 2008-04-16 at 12:00 -0400, Gang Chen wrote:
Using the "ergoStool" data cited in Mixed-Effects Models in S and S-PLUS by Pinheiro and Bates as an example, we have ========
> library(nlme)
> fm <- lme(effort~Type-1, data=ergoStool, random=~1|Subject)
> summary(fm)
Now suppose I want to test the following hypothesis H0: TypeT1 =0 and TypeT2 = 0 I've tried estimable() and glh.test() in package gmodels, esticon() in package boBy, and linear.hypothesis() in package car, but it seems none of them would work with objects from lme. ______________________________________________ R-help_at_r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Received on Thu 17 Apr 2008 - 16:46:13 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 17 Apr 2008 - 17:30:29 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive