Skip to contents

Computes ROC curves (weighted or unweighted) for evaluating propensity score balance. In causal inference, an ROC curve near the diagonal (AUC around 0.5) indicates good balance between treatment groups.

Usage

roc_curve(
  .data,
  .truth,
  .estimate,
  .wts = NULL,
  include_observed = TRUE,
  na.rm = TRUE,
  treatment_level = NULL
)

Arguments

.data

A data frame containing the variables.

.truth

The treatment/outcome variable (unquoted).

.estimate

The propensity score or covariate (unquoted).

.wts

Optional weighting variables (unquoted, can be multiple).

include_observed

Include unweighted results? Default TRUE.

na.rm

Remove missing values? Default TRUE.

treatment_level

The level of .truth to consider as the treatment/event. Default is NULL, which uses the second level.

Value

A tibble with ROC curve data.