Notation for specifying nested random effects using LME

조회 수: 20 (최근 30일)
Prabhjot Dhami
Prabhjot Dhami 2022년 2월 14일
답변: Vatsal 2023년 12월 29일
Greetings,
I have the following dataset. Patients were recruited from 4 hospital sites to be randomized to either an active or placebo treatment. Clinical scores were collected at baseline, week 2, weeek 4, week 6 and week 8. Baseline biological data was also collected. My ultimate goal is to see if the biological data collected at baseline predicts treatment trajecetories and if this differs between active and placebo treatment arms.
From my understanding, it would be best to model this using LME. However, there is a nesting structure in my data due to patients being recruited from 4 sites.
I ultimately want to know how can I specify, using LME, subjectID and site to be random effects, with subjectID nested in site.
I have come up with the following, but am quite sure it is wrong:
ClinicalScore ~ ClinicalScore_wk0 + Age + Sex + TreatmentGroup*BioData*Time + (subjectID | Site)
Any help would be greatly appreciated.
Thank you.

답변 (1개)

Vatsal
Vatsal 2023년 12월 29일
Hi,
I understand that you want to specify a nested random effects structure in your linear mixed-effects model (LME). Given that "subjectID" is nested within "Site", this relationship can be accurately captured in the random effects section of the model formula.
The model formula would look something like this:
ClinicalScore ~ ClinicalScore_wk0 + Age + Sex + TreatmentGroup*BioData*Time + (1|Site) + (1|Site:subjectID)
You can also refer to the below link for the additional information:
I hope this helps!

카테고리

Help CenterFile Exchange에서 Chemistry에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by