[R-sig-ME] longitudinal with 2 time points

array chip arrayprofile at yahoo.com
Tue Aug 24 22:21:56 CEST 2010


Hi Marc, thanks for your comments. Yes, I am debating between the 2 models as 
well. 


The first model doesnot have a "time" variable, and there is only 1 level of 
nesting: arm within subject. I think the syntax for nesting is   (1|subject / 
arm) instead of (1|arm/subject).

The 2nd model certainly have a different layout of data with a "time" variable. 
It has 2-level nesting: arm within subject within time, so the syntax should 
(1|time/subject/arm)?

Now I have a little confusion on how to define the nesting here. Can I define it 
as arm within time within subject instead? so the syntax would be 
(1|arm/time/subject)? The reason I am thinking of this way is: each subject was 
measured at 2 time points (0 & 4), at each time point, measured twice at 2 arms 
(left & right).

What is the simplest way to define nesting structure? any principles that we 
should follow? Sometimes I feel I can use different nesting structures as they 
all sound reasonable to me.

Really wish someone can chime in and share their thoughts.

John




----- Original Message ----
From: Marc Schwartz <marc_schwartz at me.com>
To: array chip <arrayprofile at yahoo.com>
Cc: r-sig-mixed-models at r-project.org
Sent: Tue, August 24, 2010 11:55:36 AM
Subject: Re: [R-sig-ME] longitudinal with 2 time points

Hi John,

Since we have crossed the threshold into mixed models, I am going to provide 
some comments, but (notably because I have not used lmer, although I attended 
Doug's class a few years ago at useR), will defer to and solicit comments from 
the lmer experts on the list.

First, I am not sure, unless we restate the model where Glucose is the response 
variable and Time is a covariate, that using Time in the random effects term 
make sense. But I could be wrong.

If we stay with and extend the ANCOVA style approach, then I might envision 
something like:
  
  lmer(wk4.glucose ~ baseline.glucose + treatment + gender + age + 
       (1 | arm / subject))

where the random effect term expresses the nesting of arm within subject. I am 
also presuming that you are not interested in arm as a main effect. So we are 
still concerned with the other main effects as before, but now consider the 
variation in the multiple measurements of glucose from each arm within each 
subject.

If you restate the model as I noted above, then perhaps:

  lmer(glucose ~ time + treatment + gender + age + 
       (1 | arm / subject / time))

might make sense. From a review of the archives, it would seem that a 
multi-level nesting is permitted in lmer formulae random effects terms, so this 
would reflect the nesting of arm, within subject, within time. The 
interpretation of this model is of course, going to be different than the ANCOVA 
based approach above.

Hopefully, this might at least provide a starting point for further discussion 
and others with greater expertise will chime in.

Regards,

Marc

P.S. Note that I trimmed some of the thread below, to conserve space...

On Aug 24, 2010, at 3:02 AM, array chip wrote:

> Hi Marc,
> 
> I have to admit that I didn't get a chance to carefully read the article before 
>
> my previous reply. So I want to wait till now to respond after finally I got a 

> chance to read the article. Thanks for your excellent explanation below. I 
>agree 
>
> that the coefficient for treatment is estimating the extent of the difference 
> between treatment and control in the CHANGE of glucose in week 4 from 
baseline.
> 
> Now my dataset becomes a little bt more complicated: each glucose testing was 
> done twice (blood was draw from left arm and right arm and tested separately. 
>So 
>
> for each patient, on each time point, there are 2 measurements (from left and 
> right arm separately). So I think I should now include factor "arm" as a random 
>
> effect:
> 
> lmer(wk4.glucose ~ baseline.glucose + treatment + gender + age+ 
> (1|subject/time))
> 
> What do you think of this model specification?
>  
> Adiitionally, since I am using mixed model now, if I code a new variable “time” 
>
> (either 0 or 4) and new response variable “y”, how do I specify a mixed model 
> with 2 random effects, one with respect to “time” variable (2 time points per 
> subject per arm), the other with respect to “arm” variable (2 arms per subject 

> per time point)?
>  
> Thanks a lot!
>  John
> 
> 
> 
> 
> ----- Original Message ----
> From: Marc Schwartz <marc_schwartz at me.com>
> To: array chip <arrayprofile at yahoo.com>
> Cc: r-sig-mixed-models at r-project.org
> Sent: Fri, August 13, 2010 7:24:59 AM
> Subject: Re: [R-sig-ME] longitudinal with 2 time points
> 
> John,
> 
> That you are asking this question indicates that either you have yet to read 
>the 
>
> article or that you need to re-read it, as you have not comprehended the 
> content.
> 
> The beta coefficient for treatment IS the difference in mean glucose change 
> between baseline and 4 weeks **attributable to treatment**, after adjusting for 
>
> any baseline differences in glucose between the two groups. That is also 
> presuming that there is no interaction at baseline.
> 
> For example, let's say that the beta for treatment is -20. Then, at 4 weeks, 
> given the same baseline glucose level, we would predict that, on average, the 
> treatment group will have a glucose level 20 mg/dl less than the control group. 
>
> 
> 
> In the absence of an interaction, we would estimate the same average treatment 

> difference at 4 weeks of 20 mg/dl whether the baseline glucose was 300 mg/dl or 
>
> 100 mg/dl. 
> 
> 
> However, given regression to the mean, we might reasonably expect the patient 
> with a 300 mg/dl baseline level to have a greater mean reduction at 4 weeks as 

> compared to the patient with a 100 mg/dl baseline level. 
> 
> 
> We might also expect a patient with a glucose level at the low end of the 
> baseline range (eg. 50 mg/dl) to experience an average increase in glucose 
>level 
>
> at 4 weeks, presuming that your inclusion/exclusion criteria permitted patients 
>
> with below normal glucose levels. But the difference will still be, on average, 
>
> 20 mg/dl between the two treatment groups.
> 
> So the patient with a 300 mg/dl baseline level might have an average reduction 

> to 200 mg/dl at 4 weeks on the control treatment, whereas the same patient on 
> the active treatment would have an average reduction to 180 mg/dl (a difference 
>
> of -20).
> 
> The patient with a 100 mg/dl baseline level might have an average reduction to 

> 90 mg/dl at 4 weeks on the control treatment, whereas the same patient on the 
> active treatment would have an average reduction to 70 mg/dl (again, a 
> difference of -20).
> 
> The patient with a 50 mg/dl baseline level might have an average increase to 90 
>
> mg/dl at 4 weeks on the control treatment, whereas the same patient on the 
> active treatment would have an average increase to 70 mg/dl (yet again, a 
> difference of -20).
> 
> So your conclusion would be that on average, between baseline and 4 weeks, 
> glucose levels were reduced by 20 mg/dl more in the active treatment group 
> relative to control.
> 
> This difference is the vertical separation in the two parallel fitted 
>regression 
>
> lines as shown in the figure in the paper.
> 
> So the method is answering exactly the question the investigator is asking.
> 
> Marc
> 
> 
> On Aug 13, 2010, at 1:02 AM, array chip wrote:
> 
>> Marc,
>> 
>> Thanks for sharing your insights. Let's take this model as an example:
>> 
>>   lm(wk4.glucose ~ baseline.glucose + treatment + gender + age)
>> 
>> Because the investigator is interested in knowing whether the CHANGE of glucose 
>>
>> 
>> in week 4 from baseline is different between treatment and control, Is it still 
>>
>> 
>> legitimate to ask whether and HOW can we test this hypothesis? I think the 
>> coefficient of the treatment factor is only testing whether the week 4 glucose 
>
> 
>> level is different between treatment and control, but not testing whether 
>> the CHANGE of week 4 glucose level with respect to baseline is different 
>> between 
>> 
>> treatment and control.
>> 
>> Thanks again for your suggestion.
>> 
>> Yi







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