[R-sig-ME] nested cross-sectional model using lme4 or nlme

Alan Kelly akelly at tcd.ie
Fri Jun 26 08:15:40 CEST 2009


Dear all, following a suggestion from one of your contributors, I'm  
posting the following query to R-sig-mixed having had limited response  
from R-help.

I'm attempting to analyse a nested cross-sectional design in which an  
intervention was offered to a series of randomly selected (small)  
communities, so the unit of randomisation is the community.  All  
available individuals in each community were interviewed before the  
intervention and again at follow-up post-intervention.  The set of  
available individuals at baseline and at follow-up was far from  
identical (a common feature of such designs).  Similarly, a series of  
control communities were interviewed.  This type of design is  used in  
epidemiological studies particularly in interventions designed to  
alter lifestyle factors.  Such designs tend to be highly unbalanced.   
Murray et al. discuss the appropriate analysis of such studies  
(Analysis of data from group-randomized trials with repeat  
observations on the same groups, Stats in Med. 17, 1581-1600).  They  
offer three examples of  SAS code - one of which is as follow:

proc mixed;
class cond unit timecat;
model y=cond timecat cond*timecat/ddfm=res;
random int timecat/subject=unit(cond);
run;

cond is 0/1 corresponding to control/intervention
timecat is 0/1 corresponding to baseline/follow-up
unit is 1 to 39 and identifies the communities.
and y is a continuous score

Unfortunately I'm not familiar with SAS code.  I would expect random  
effects for unit and timecat X unit.

I would much appreciate any suggestions on how to code the above in  
lme4 or nlme.

Alan Kelly
Trinity College Dublin




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