strengejacke / sjPlot

sjPlot - Data Visualization for Statistics in Social Science
https://strengejacke.github.io/sjPlot
603 stars 91 forks source link

order random intercepts by fixed effect group #816

Open cperk opened 2 years ago

cperk commented 2 years ago

Hi!

I looked through all the old issues but couldn't find a fix; in plot_model(), would you be able to add the option to order the random intercepts by a fixed effect? For example in a model with a categorical fixed effect with 2 levels (A and B) and Subject as the random effect, where subjects belong to groups A and B, such that the random intercepts for subjects in group A are shown above those in group B.

Thanks!!