The data
The predicted variable is a categorical response, named
resp with levels ‘1’, ‘2’, ‘3’, and ‘4’ (nominal labels,
not numerical values). The predictor is a categorical/nominal
variable named group, with levels ‘A’ through ‘K’.
Notice these aspects of the data:
The proportion of response ‘2’ equals response ‘3’ within each group, and across all groups. Specifically, in every group, p(‘2’) = p(‘3’) = 0.25.
The proportions of responses ‘1’ and ‘4’ are symmetric reflections of each other, with p(‘1’|A) = p(‘4’|K), p(‘1’|B) = p(‘4’|J), and so on.
Multilevel (hierarchical) multinomial logistic regression in brms
Because of the multiple groups, this is a natural setting to try a hierarchical model that shares information across groups, and will provide shrinkage across groups. Because of the symmetry in the data, the hierarchical model should symmetrically shrink the response ‘1’ proportions closer to 0.25, and do the same for the response ‘4’ proportions.
I call brm() with the usual hierarchical
formula = resp | trials(n) ~ 1 + (1 | group).
We can get the posterior predictions and make a plot:
Notice these aspects of the posterior predictions:
Contrary to the data, the proportion of response ‘2’ is not the same across groups, and the proportion of response ‘3’ is not the same across groups.
Contrary to the data, within every group, p(‘1’) = p(‘2’) = p(‘3’).
Contrary to the data, the proportion of response ‘1’ does not symmetrically mirror response ‘4’.
In the full document linked below, I explain why this happens and I propose a solution. Has this problem been pointed out before? Has this solution been proposed before?
To see the full description of the issue, click the link below to download the HTML file. Then find the downloaded HTML file on your computer and double-click it to open it in your browser:
https://drive.google.com/uc?export=download&id=1z_hGTzkkIlMJ0Tk2ONCH96bZh10l0gMr
(If you're reluctant to click a direct download link, you can find the HTML document at the following link, and then manually download it https://drive.google.com/file/d/1z_hGTzkkIlMJ0Tk2ONCH96bZh10l0gMr/view?usp=drive_link.)