Exponentiation of clmm coefficients in the ordinal package
orvaquim opened this issue · 0 comments
orvaquim commented
I think there is a small bug in the model_parameters() for clmm (from ordinal package). It seems to be insensitive to exponentiate = TRUE.
The clmm fits a mixed-effects proportional odds model. So exponentiation of the coefficients here is an odds-ratio. Here is an example:
library(ordinal)
library(parameters)
mox <- clmm(rating ~temp + contact + (1|judge), data = wine)
> model_parameters(mox, exponentiate = FALSE)
# Fixed Effects
Parameter | Log-Odds | SE | 95% CI | z | p
-----------------------------------------------------------------
1|2 | -1.62 | 0.68 | [-2.96, -0.29] | -2.38 | 0.017
2|3 | 1.51 | 0.60 | [ 0.33, 2.70] | 2.51 | 0.012
3|4 | 4.23 | 0.81 | [ 2.64, 5.81] | 5.23 | < .001
4|5 | 6.09 | 0.97 | [ 4.18, 7.99] | 6.26 | < .001
temp [warm] | 3.06 | 0.60 | [ 1.90, 4.23] | 5.14 | < .001
contact [yes] | 1.83 | 0.51 | [ 0.83, 2.84] | 3.58 | < .001
> model_parameters(mox, exponentiate = TRUE)
# Fixed Effects
Parameter | Odds Ratio | SE | 95% CI | z | p
-------------------------------------------------------------------
1|2 | -1.62 | 0.68 | [-2.96, -0.29] | -2.38 | 0.017
2|3 | 1.51 | 0.60 | [ 0.33, 2.70] | 2.51 | 0.012
3|4 | 4.23 | 0.81 | [ 2.64, 5.81] | 5.23 | < .001
4|5 | 6.09 | 0.97 | [ 4.18, 7.99] | 6.26 | < .001
temp [warm] | 3.06 | 0.60 | [ 1.90, 4.23] | 5.14 | < .001
contact [yes] | 1.83 | 0.51 | [ 0.83, 2.84] | 3.58 | < .001
Although it changes the heading, the coefficients are not exponentiated at all.