Home > Enterprise >  How to only show fixed effect estimates of lmer model using sjPlot::plot_model
How to only show fixed effect estimates of lmer model using sjPlot::plot_model

Time:11-24

I would like to plot the estimates of the fixed effects of an lme4::lmer model. Currently, the sjPlot::plot_model output includes two additional plots that I do not want: SD (Observations) and SD (Intercept). How can I remove these two additional plots?

library(lme4)
data(iris)
lmerMod <- lmer(Sepal.Length ~ Sepal.Width * Petal.Length   (1|Species), data=iris)

library(sjPlot)
plot1 <- plot_model(lmerMod,
           type = "est",
           show.intercept = TRUE,
           title = "Estimates of fixed effects")

enter image description here

And then I run the second part:

glmMod <- glm(Sepal.Length ~ Sepal.Width * Petal.Length, data=iris)
plot2 <- plot_model(glmMod,
                    type = "est",
                    show.intercept = TRUE,
                    title = "Estimates of fixed effects")
plot2

enter image description here

  • Related