Skip to contents

R parity for the Python morie.fairness.predpol module. A clean-room, city-agnostic reimplementation of the district-level analysis of the SciencesPo Predictive-policing-Chicago project (Lacherade, Szabo, Krikava & Aeby, 2021): rank areas by the risk an algorithm predicts, rank them by their realised outcome rate, and test whether the disagreement tracks the areas' demographic composition.

Value

morie_predpol_aggregate_areas() returns a per-area data.frame; morie_predpol_calibration_audit() and morie_predpol_score_disparity() return named lists of audit statistics, per-group breakdowns, and a plain-language interpretation.

Details

Functions:

Written from the project's published methodology; no code copied (that repository carries no licence and is not redistributable).

Examples

agg <- morie_predpol_aggregate_areas(
  area = c("a", "a", "b", "b"), risk = c(10, 20, 30, 40),
  outcome = c(1, 0, 1, 1)
)
agg$mean_risk
#> [1] 15 35