strengejacke/sjPlot

Error for plotting interaction effect using plot_model()

MMarieSchuckart opened this issue · 0 comments

Hi, I get a similar error to the one @HarrisonBP posted in this thread in 2018: #413

I ran a linear mixed model using the lme4 package (with main & interaction effects as fixed effects as well as subject-specific random slopes).

When I try to plot my interaction effects, I get the same error message Harrison got:

sjPlot::plot_model(mixed.lmer_all, type = "int", terms = c("block_kind", "surprisal"))
Error: Variables of type `logical` do not work, please coerce to factor and fit the model again.

Neither "block_kind" nor "surprisal" are of type logical and the only logical-variable was transformed to factor before fitting the model, so this doesn't really make sense to me.

Plotting main effects with type = "eff" works fine btw. I updated R as well as all packages, but the error persists.