observed_vs_theoretical {guideR} | R Documentation |
Plot observed vs predicted distribution of a fitted model
Description
Plot observed vs predicted distribution of a fitted model
Usage
observed_vs_theoretical(model)
Arguments
model |
A statistical model. |
Details
Has been tested with stats::lm()
and stats::glm()
models. It may work
with other types of models, but without any warranty.
Value
A ggplot2
plot.
Examples
# 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()
[Package guideR version 0.4.0 Index]