cal_plot: Visualise calibration

View source: R/cal_plot.R

cal_plotR Documentation

Visualise calibration

Description

Use to obtain a calibration plot for a predictive model

Usage

cal_plot(
  predictr = NULL,
  fit = NULL,
  risk_ntile = NULL,
  risk_class = NULL,
  se = F
)

Arguments

predictr

Output from the predictr function (alternative to fit parameter)

fit

Logistic regression fit object (alternative to predictr parameter)

risk_ntile

Numerical value specifying the number of predictive risk quantiles (default=NULL)

risk_class

Numerical list specifying the cutoffs for predictive risk classes (default=NULL; range: 0 to 1)

se

Logical value specifying if confidence intervals should be added to the plot

Value

ggplot of the calibration plot with predicted risk either continuous (default) or categoried by quantiles or risk classes.


kamclean/predictr documentation built on Aug. 14, 2022, 4:35 a.m.