
Autoplot for bootstrap_performance objects
Source:R/model_performance_bootstrap_rmse.R
autoplot.bootstrap_performance.Rdautoplot() method for objects created by bootstrap_performance().
Produces a histogram and density plot of the bootstrapped RMSE values,
with the RMSE of the original fitted model shown as a dashed vertical line.
Optionally, 95% quantile bounds are shown as dotted vertical lines.
Usage
# S3 method for class 'bootstrap_performance'
autoplot(object, fill = "steelblue", color = "black", ...)Arguments
- object
An object of class
"bootstrap_performance", produced bybootstrap_performance().- fill
Fill color of the histogram bars. Default =
"steelblue".- color
Border color of the histogram bars. Default =
"black".- ...
Additional arguments passed to
ggplot2::autoplot().
Value
A ggplot2::ggplot object.
Examples
if (FALSE) { # \dontrun{
mod1 <- glm(nclaims ~ age_policyholder, data = MTPL,
offset = log(exposure), family = poisson())
x <- bootstrap_performance(mod1, MTPL, n = 100, show_progress = FALSE)
autoplot(x)
} # }