I tried to use the following code to produce figures depicting the predicted values for specific variables. However, I get the error:
Error in (show.zeroinf && minfo$is_zero_inflated) || minfo$is_dispersion :
invalid 'y' type in 'x || y'
Can someone explain me this error message? Is it not possible to specific the type="pred with plot_models? With only model (plot_model) it works...
Thanks!
data(efc)
fit1 <- lm(barthtot ~ c160age + c12hour + c161sex + c172code, data = efc)
fit2 <- lm(neg_c_7 ~ c160age + c12hour + c161sex + c172code, data = efc)
fit3 <- lm(tot_sc_e ~ c160age + c12hour + c161sex + c172code, data = efc)
plot_models(
fit1, fit2, fit3,
type="pred",
rm.terms = c(
"c12hour", "c161sex", "c172code"
)
)