I am using glmer to create a hierarchical mixed model, and plot_model to display the results as a forest plot.
hmdl <- glmer(asww ~ bwo + dx_year + psadx + agedec + (1 | practiceid/npi),
data = mdata, family = binomial(link = "logit"), control = glmerControl(optimizer = "Nelder_Mead"))
plot_model(hmdl, title = "Predictors of active surveillance", axis.labels=labels,
group.terms = c(1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 4, 4, 4, 4),
axis.lim = c(0.7,4), colors="Set1")
It all works fine, but reviewers of the paper have asked that the reference levels for the model be displayed on the plot. These of course are have OR 1.0, but I can't figure out a way to force these into the glmer output or into plot_model. Is this possible?
(Here's an example of the same question using the mtcars data, in which I would want to include the reference lines for OR=1.0 for cyl=4, gear=3, and carb=1:
carmodel <- glm(am ~ as.factor(cyl) + as.factor(gear) + as.factor(carb), data = mtcars)
plot_model(carmodel)