roc_plot_format: Format data prior to plotting ROC plot for one or more...

View source: R/roc_plot_format.R

roc_plot_formatR Documentation

Format data prior to plotting ROC plot for one or more models.

Description

Format data prior to plotting ROC plots for one or more models.

Usage

roc_plot_format(
  data,
  model = NULL,
  event = "event",
  predict = "predict",
  smooth = F,
  confint = F
)

Arguments

data

Dataframe with at least 2 columns: (1) binary outcome of interest, (2) predicted probability of outcome (binary or continuous)

model

Optional string specifying the column name specifying which model each outcome/prediction belongs to (default ="model"). This allows multiple models to be assessed within 1 function.

event

String specifying the column name containing the binary outcome of interest (default ="event")

predict

String specifying the column name containing predicted probability of outcome (default ="prediction")

smooth

Logical value specifying if the ROC curve should be smoothed (default=FALSE)

confint

Logical value specifying if the confidence interval of the sensitivity/specificity should be calculated (default = FALSE)

Value

Tibble with sensitivity/specificity for one or more models.


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