[R-sig-ME] Fitting a partially nested model with lmer or lme

Christopher David Desjardins cdde@j@rd|n@ @end|ng |rom gm@||@com
Wed Jun 14 13:58:51 CEST 2023


I am analyzing some longitudinal data (3 time points) where participants
were randomly assigned to either a treatment or control condition. Within
the treatment condition, participants were randomly assigned to 1 of 5
facilitators. Therefore, I have measurements nested within participants for
the control participants and measurements nested within participants nested
within facilitator for the treatment participants. How can I fit model that
accommodates for this design in lmer() or lme()?

If I let,

y = response variable
trt = 1 for treatment, 0 for control
ID = unique identifier for each participant
time = days since start of study (3 time points / participant)
facilitator = unique identifier for each facilitator, control participants
will have NA by design.

I would like to fit a model that looks like this with lmer() syntax,

lmer(y ~ trt * time + (1 | facilitator)  + (1 | facilitator:ID), data =
data)

But this model (obviously) drops all my treatment participants as they
don't have values for facilitator in my current coding.

Therefore, I've been fitting this model:

m0 <- lmer(y ~ trt * time + (1 | ID) , data = data)

But I was searching on StackOverflow and found this link,
https://stackoverflow.com/questions/37201754/three-level-partially-nested-model/37205167#37205167,
where it's suggested to recode NA for facilitator to "none". When I recode
facilitator from NA to "none" and fit this model:

m1 <- lmer(y ~ trt * time + (1 | facilitator)  + (1 | facilitator:ID), data
= data)

I get similar estimates to m0, however, the SE increase and the df decrease
(using lmerTest) substantially. I am wondering if this is caused by any
potential confounding of trt and facilitator because all participants that
received the treatment (trt = 1), will have "none" as their facilitator
despite not sharing a facilitator. Otherwise, the two models are nearly
identical in terms of log-likelihood.

I am wondering what approach makes the most sense for my design.

Thanks for the help.

Chris

	[[alternative HTML version deleted]]



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