Notation for specifying nested random effects using LME

7 views (last 30 days)
Prabhjot Dhami
Prabhjot Dhami on 14 Feb 2022
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.

Answers (0)

Community Treasure Hunt

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

Start Hunting!