powered by
Compute the difference in risk between human+AI and human decision makers using difference-in-means estimators.
compute_stats(Y, D, Z, X = NULL, l01 = 1)
A tibble the following columns:
Z_focal: The focal treatment indicator. `1` indicates the treatment group.
Z_focal
Z_compare: The comparison treatment indicator. `0` indicates the control group.
Z_compare
X: Pretreatment covariate (if provided).
X
loss_diff: The difference in loss between human+AI and human decision
loss_diff
loss_diff_se: The standard error of the difference in loss
loss_diff_se
fn_diff: The difference in false negatives between human+AI and human decision
fn_diff
fn_diff_se: The standard error of the difference in false negatives
fn_diff_se
fp_diff: The difference in false positives between human+AI and human decision
fp_diff
fp_diff_se: The standard error of the difference in false positives
fp_diff_se
An observed outcome (binary: numeric vector of 0 or 1).
An observed decision (binary: numeric vector of 0 or 1).
A treatment indicator (binary: numeric vector of 0 or 1).
Pretreatment covariate used for subgroup analysis (vector). Must be the same length as Y, D, Z, and A if provided. Default is NULL.
Ratio of the loss between false positives and false negatives
compute_stats( Y = NCAdata$Y, D = ifelse(NCAdata$D == 0, 0, 1), Z = NCAdata$Z, X = NULL, l01 = 1 )
Run the code above in your browser using DataLab