[R-sig-ME] Baseline + Follow-Up

Douglas Bates bates at stat.wisc.edu
Wed Feb 3 19:07:17 CET 2010


On Wed, Feb 3, 2010 at 11:46 AM, Isabella Ghement <isabella at ghement.ca> wrote:
> Thank you so much, Douglas!  I am not familiar with the "0" trick - can you
> provide me with
> some intuition for why this might work?

The (Intercept) term is implicit in a linear model formula.  Thus the formula

FollowUp ~ Treatment + Baseline

is equivalent to

FollowUp ~ 1 + Treatment + Baseline

The symbolic analysis of the formula and data detects that there is an
intercept term and expresses Treatment as one contrast, which happens
to be the difference between treatment B and treatment A.  The 0 + in
the formula

FollowUp ~ 0 + Treatment + Baseline

suppresses the intercept term.  The first factor in the formula is
then expressed as a set of indicator columns, producing separate
estimates for treatment A and treatment B.

>
> Isabella
>
>
> -----Original Message-----
> From: dmbates at gmail.com [mailto:dmbates at gmail.com]On Behalf Of Douglas
> Bates
> Sent: February 3, 2010 9:40 AM
> To: Isabella Ghement
> Cc: r-sig-mixed-models at r-project.org
> Subject: Re: [R-sig-ME] Baseline + Follow-Up
>
>
> On Wed, Feb 3, 2010 at 11:12 AM, Isabella Ghement <isabella at ghement.ca>
> wrote:
>> Hi everyone,
>>
>> I am using the lme() function in the nlme library to fit a linear mixed
>> effects model
>> such as the one below, where an individual-level follow-up measurement is
>> modeled as a linear
>> function of an individual-level baseline measurement plus a fixed
> treatment
>> effect
>> plus a random cluster effect plus random error:
>>
>> lme(FollowUp ~ Baseline + Treatment, random=~1|Cluster, method="REML",
>> data=Data)
>>
>> The summary of the lme model fit reports a point estimate and confidence
>> interval
>> for the treatment effect (i.e., difference in adjusted treatment means),
> but
>> I am also
>> interested in getting estimates and confidence intervals for the adjusted
>> treatment means.
>> In my case, Treatment is a factor having two levels (say, A and B).
>> Is there a way to force lme() to report these quantities?
>
> If I understand what you are asking, you can get these standard errors
> by modifying the formula to
>
> FollowUp ~ 0 + Treatment + Baseline
>
>




More information about the R-sig-mixed-models mailing list