strengejacke / sjPlot

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

Question: plot_model() to retain factor levels as labels #801

Open M-Colley opened 2 years ago

M-Colley commented 2 years ago

Hello and thank you for this great package!

I have a question: when plotting a model with interaction effects, these effects do not use the "Male" as a label for the plot. Can these be used? Unfortunately, I don't find any information on this...

` library(sjmisc) library(sjPlot) data(efc) efc <- to_factor(efc, c161sex, e42dep, c172code)

levels(efc$c161sex)

m <- lm(neg_c_7 ~ c161sex * c12hour, data = efc)

sjPlot::plot_model(m, auto.label = TRUE)`

This can be seen here on the bottom.

image