I'm trying to code a clmm model in R to analyze 1-5 Likert data. Respondents in different cities were asked to take a survey twice: once before a treatment, then again afterwards (Treatment). The model aims to assess whether and how the treatment interacts with demographic factors, namely respondent age (Age) and socioeconomic status (SES). Thus, I believe I need a random effects structure that will accommodate both the nested nature of subjects (City), and the repeated measures (Subject). I'm thinking my model should look something along the lines of: clmm(Likert~Treatment*Age+Treatment*SES+(1|City/Subject)
, but I'm largely self-taught when it comes to mixed effects models and often struggle with defining random effects. Thanks!
1 Answer
The proposed model is:
clmm(Likert ~ Treatment*Age + Treatment*SES + (1|City/Subject)
This model will fit fixed effects for:
Treatment
Age
SES
- the two way interaction between
Treatment
andAge
- the two way interaction between
Treatment
andSES
- random intercepts for
City
- random intercepts for
Subject
varying withinCity
(ieSubject
is nested withinCity
.
Based on the description in the post, this seems like a perfectly reasonable approach.
-
$\begingroup$ Does this answer your question ? If so please consider marking it as the accepted answer. If not, please let us know why. Also, if you haven't already, please consider upvoting it. $\endgroup$ Jul 24, 2021 at 12:04