View source: R/plot_halfnormal.R
plot_halfnormal | R Documentation |
The half-normal plot is one of the tools designed to evaluate the goodness of fit of a statistical models. It is a graphical method for comparing two probability distributions by plotting their quantiles against each other. Points on the plot correspond to ordered absolute values of model diagnostic (i.e. standardized residuals) plotted against theoretical order statistics from a half-normal distribution.
plot_halfnormal(object, ..., quantiles = FALSE, sim = 99)
plotHalfNormal(object, ..., quantiles = FALSE, sim = 99)
object |
An object of class |
... |
Other |
quantiles |
If TRUE values on axis are on quantile scale. |
sim |
Number of residuals to simulate. |
A ggplot object.
model_halfnormal
score_halfnormal
dragons <- DALEX::dragons[1:100, ]
# fit a model
model_lm <- lm(life_length ~ ., data = dragons)
lm_audit <- audit(model_lm, data = dragons, y = dragons$life_length)
# validate a model with auditor
hn_lm <- model_halfnormal(lm_audit)
# plot results
plot_halfnormal(hn_lm)
plot(hn_lm)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.