I am decently familiar with basic random effect structures for mixed effect models (i.e., random intercepts per id) but struggle to identify the most justifiable structures for more complex study designs (i.e., crossed and/or nested random effects). I have examined most of the other questions/topics here and SO that discuss this concept but it’s’ still not clicking for me. Is there a series of questions / processes one can follow when looking at a naive dataset to understand what random effects may be the best place to start? I am aware that there is no black/white answer here and much of these depends on your research question / what seems to be the most appropriate for a given dataset (i.e., model comparisons)
Here is a theoretical study design I’m struggling with:
- 20 participants (i.e., id)
- response variable is continuous (i.e., response)
- Within each participant, their upper limbs (i.e., limb = dominant/nondominant) are randomized into one of two conditions (i.e., condition = A or B.)
- Each limb is measured on two occasions (i.e., time = pre / post) after receiving the condition
- Finally, each participant completes two “phases”, where after a washout period, they complete the same intervention again, re-randomizing their limbs to the two conditions
- In terms of the research question, I am the most interested in comparing the change scores (after adjusting for phase) between the two conditions. Here is my current thinking on the model that best approaches this study design and research question:
lme4::lmer(response ~ condition * time + phase + (1 | id / limb))
limbrandom? Don't participants have usually two? – usεr11852 Apr 18 '23 at 14:59limbthen should be included as a fixed term too. – usεr11852 Apr 18 '23 at 16:40limbas a fixed effect too (notid) because (simplistically) I do believe that there might be some differences in how people perform a task with their right instead of their left limb. In that sense, it might even make sense to have information for their dominant arm. – usεr11852 Apr 18 '23 at 20:42response ~ condition * time + phase + limb + (1 | id / limb)- I still don't quite understand how you're arriving at that conclusion though. What question(s) are you asking yourself to determine whether the effect should also be included as a fixed effect? I apologize if I'm just missing the point here, this distinction is challenging for me to grasp – zr2015 Apr 21 '23 at 23:37