modelbased
modelbased copied to clipboard
Plot method for categorical focal predictors
First, it's difficult to see the point estimate, and second, this plot shows no confidence intervals?
m <- lm(Sepal.Width ~ Petal.Length + Petal.Width + Species, data = iris)
modelbased::estimate_expectation(m, insight::get_datagrid(iris, "Species")) |> plot()

Created on 2022-08-11 by the reprex package (v2.0.1)
There's no error band because the x variable is discrete. With a discrete focal variable, we should make a recipe like that for estimate_means()
Yes, yes, I know (that's why I added "categorical" in the title), I just wanted to keep this issue in mind, because we have CIs for the predictions, we just don't plot them.
Yep, this is a bug that has bothered me for a while lol
same as #145 ?