demographic_parity {SPARRAfairness}R Documentation

demographic_parity

Description

Estimates demographic parity for a risk score (essentially cumulative distribution function)

Usage

demographic_parity(
  scores,
  group1,
  group2,
  cutoffs = seq(min(scores, na.rm = TRUE), max(scores, na.rm = TRUE), length = 100)
)

Arguments

scores

vector of risk scores

group1

indices of group 1

group2

indices of group 2

cutoffs

score cutoffs at which to estimate DP (default 100 evenly-spaced)

Value

matrix of dimension length(cutoffs)x4, with (i,2g-1)th entry the proportion of scores in group g which are less than or equal to the ith cutoff value and (i,2g)th entry the approximate standard error of the (i,2g-1)th entry

Examples

# See vignette

[Package SPARRAfairness version 0.0.0.1 Index]