Random effects for ordinal multilevel regression

Hello everyeone,

I am working with a brms model that tries to model children bullying categories (3 of them: never, monthly, weekly) as a function of their socio economic status (continuous scale). The data stems from an ILSA (international large scale assesment) tool and the model take into account explicit nesting: children nested in schools nested in countries. Three level MLM, with random intercepts and random slopes. According to LOO the best model.

Here is the code.

m <- brm(data = df,
                family = "cumulative",
                bf(bully_categories ~ 1 +  SES + (1+SES|idcntry/idschool)),
                cores = 4,
                chains = 4,
                backend = "cmdstanr",
                threads = threading(8))

My problem:

While everything works perfectly and i can extract the population level estimates and nice plots for them (such as conditional_effets, categorical = TRUE), I desperately need the graphs for the country level estimates that stem from the random effects. For other distribution families there are forest plots and so on, but nothing for ordinal multilevel regressions.

Any ideas?
George

If I understand you correctly, you might be able to try posterior_predict or posterior_epred, and give it as new_data a dataframe including the specific countries you want. It will give you back a matrix that provides posterior estimates for the specific categories/countries you have asked for.

This might help you somewhat in how to construct conditional effect plots where the group for a random effect is treated as “fixed”. Treat random intercept/effects as "fixed" effects in conditional_effects · Issue #1012 · paul-buerkner/brms · GitHub