library(performance)
model <- lm(Sepal.Length ~ Species * Petal.Width + Petal.Length, data = iris)
check_predictions(model)
# dot-plot style for count-models
d <- iris
d$poisson_var <- rpois(150, 1)
model <- glm(
poisson_var ~ Species + Petal.Length + Petal.Width,
data = d,
family = poisson()
)
out <- check_predictions(model)
plot(out, type = "discrete_dots")
Run the code above in your browser using DataLab