Correlated random effects in categorical model?

I recently encountered an interesting paper by Koster & McElreath (2017) in which they propose a multinomial regression model with random effects that are correlated over each category equation, as shown in the paragraph " The multilevel multinomial behavior model". I am quite new to working with brms but as far as I understand the family = categorical()-argument it by default assumes independence between the random effects in each category. Is there a way around this assumption to fit a model similar to that proposed by Koster & McElreath?

Thanks for your help!

2 Likes

See vignette("brms_multilevel") for the syntax to make random effects to be correlated across formulas / categories.

Thanks for the reference, Paul. Just to clarify using the terminology from McElreath et al.: Do you propose something like

brm(cbind(pi_1, pi_2, pi_3) ~ (1 | ID | v), 
family = bernoulli(link = "logit"), 
prior(lkj(eta), class = cor)

where for each observation either pi_1, pi_2 or pi_3 = 1?

No. Go for something like

brm(y ~ (1 | ID | v), family = categorical(), ...)

The term ID is arbitrary and just ensures that the random effects will be modeled as correlated.

2 Likes

It is hard to believe that it is actually that simple. We should erect a monument to honor this package.

4 Likes

One more thing that came to my mind: Is it possible to induce correlations for a nesting of random effects? Something like:

brm(y ~ (1 | ID | state/county/zip), family = categorical(), ...)

Split the nested term in its parts and set separate ids for that, e.g.

(1 | ID1 | state) + (1 | ID2 | state:county) + (1 | ID3 | state:county:zip)

For more details, please consult vignette("brms_multilevel")

2 Likes