View source: R/ability_agreement.R
compute_stats_agreement | R Documentation |
Estimate the impact of AI recommendations on the agreement between human decisions and AI recommendations using a difference-in-means estimator of an indicator 1\{D_i = A_i\}
.
compute_stats_agreement(Y, D, Z, A, X = NULL)
Y |
An observed outcome (binary: numeric vector of 0 or 1). |
D |
An observed decision (binary: numeric vector of 0 or 1). |
Z |
A treatment indicator (binary: numeric vector of 0 or 1). |
A |
An AI recommendation (binary: numeric vector of 0 or 1). |
X |
Pretreatment covariate used for subgroup analysis (vector). Must be the same length as Y, D, Z, and A if provided. Default is NULL. |
A tibble with the following columns:
X
: Pretreatment covariate (if provided).
agree_diff
: Difference in agreement between human decisions and AI recommendations.
agree_diff_se
: Standard error of the difference in agreement.
compute_stats_agreement(
Y = NCAdata$Y,
D = ifelse(NCAdata$D == 0, 0, 1),
Z = NCAdata$Z,
A = PSAdata$DMF
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.