I am currently examining marginal effects of some fixed effects factors in a mixed effects logistic. To do so, I've employed the ggpredict
function of the tremendously helpful ggeffects
package. I then also used the tab_model
function of the associated sjPlot
package to produce tables that include odd ratios. However, I was a bit surprised by the output of each:
1) I now see that all levels of my factor predictors are included in the output (as opposed to R's usual dummy coding in which one level of each factor serves as a reference for contrasts). Is it possible to retain a reference level in the ggpredict
output? I was hoping to use it to i) check against manual calculations and ii) compare it to the glmer model coefficients that are not similarly calculated conditionally upon the random effects.
2) The odds ratios provided by tab_model
are identical to those that I obtained by exponentiating the coefficients provided by my original glmer
model (per the IDRE example procedure). However, I was under the impression that the ORs calculated were derived from marginal coefficients that did not account for the influence of the random effect in my model (see the paragraph starting with "Many people prefer" here, the "Predicted Probabilities and Graphing" section here, and top answer here for more information). In turn, does this mean that the ORs for fixed effects variables provided by tab_model
similarly do not account for the influence of the random effect? If that's the case, is there an argument or other means by which to do so?
Thanks!