compute_stats {aihuman}R Documentation

Compute Risk (Human+AI v. Human)

Description

Compute the difference in risk between human+AI and human decision makers using difference-in-means estimators.

Usage

compute_stats(Y, D, Z, X = NULL, l01 = 1)

Arguments

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).

X

Pretreatment covariate used for subgroup analysis (vector). Must be the same length as Y, D, Z, and A if provided. Default is NULL.

l01

Ratio of the loss between false positives and false negatives

Value

A tibble the following columns:

Examples

compute_stats(
  Y = NCAdata$Y,
  D = ifelse(NCAdata$D == 0, 0, 1),
  Z = NCAdata$Z,
  X = NULL,
  l01 = 1
)


[Package aihuman version 1.0.1 Index]