estimate_diagnostic: Function to calculate diagnostics based on model outputs

View source: R/diagnostics.R

estimate_diagnosticR Documentation

Function to calculate diagnostics based on model outputs

Description

This function defines the calculations of common model diagnostics which are available.

Usage

estimate_diagnostic(data, label, prediction, diag_name, params)

Arguments

data

The full data frame with all auxilliary columns.

label

The (string) column name for the labels to evaluate against.

prediction

The (string) column name of predictions from the model to diagnose.

diag_name

The (string) name of the diagnostic to calculate. Currently available are "AUC", "MSE", "SL_coefs", "SL_risk", "RROC"

params

Any other necessary options to pass to the given diagnostic.

Examples

df <- dplyr::tibble(y = rbinom(100, 1, 0.5), p = rep(0.5, 100), w = rexp(100), u = 1:100)
attr(df, "weights") <- "w"
attr(df, "identifier") <- "u"
estimate_diagnostic(df, "y", "p", "AUC")

tidyhte documentation built on Aug. 14, 2023, 5:08 p.m.