Skip to content

Different outcome groups with MASS:polr and rms::lrm #1294

Discussion options

You must be logged in to vote

Thanks for the report.

marginaleffects does not determine the groupings itself, and completely defers to the upstream modeling package to do so. In this case, you'll note that if we call the base R predict() function on models from these two packages, we'll get matrices of different shapes, and with different labels.

avg_slopes() is completely agnostic with respect to the meaning of the quantities generated by predict(). It gives you the average slope for each column, with respect to the predictor of interest. So the interpretation depends on what the upstream packages have decided to put in those columns, and you should refer to the respective packages documentation for the predict() met…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mhoenicka
Comment options

Answer selected by mhoenicka
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants