Hi everyone,
I’m trying to fit a model similar to the one included in the screenshot below. I have no issues running the model with brms, I am trying to see if I am getting the syntax down right.
fit <- brm(cbind(pro, against) ~ 1 + (1| race_gender)
+ (1 | age_categories2) + (1|edu_categories)
+ (1 | region2 + religion_categories | state),
data = collapsed, family = binomial(link = "logit"),
chains =4, cores = 4)
The tricky part for me is modeling the state effects, because of the region level effect that’s endogenous to it. From what I understand, (1 | region2 + religion_categories | state) allows the intercept to vary by region for each state, with each region level intercept being drawn independently, and allows the slope to vary by religion for each state. Does this seem correct?
- Operating System: mac
- brms Version:2.12.0
Thank you,
Gabriel