# a linear model
mod <- lm(Sepal.Length ~ Sepal.Width + Species, data = iris)
mod |> observed_vs_theoretical()
# a logistic regression
mod <- glm(
as.factor(Survived) ~ Class + Sex,
data = titanic,
family = binomial()
)
mod |> observed_vs_theoretical()
Run the code above in your browser using DataLab