
Monotonicity of judges without outcomes: do the leniency rankings hold in every subgroup?
Source:R/judge_iv.R
morie_judge_monotonicity.RdJudge designs need judges ordered by leniency: whoever a lenient judge detains, a stricter
one detains too (nesting, the many-judge monotonicity). Nesting holds person by person, so it
orders the judges' detention rates inside every subgroup of defendants
(Research.P14Slope.subgroup_propensity_mono). For every pair of judges, the one with the
higher detention rate overall should not have a lower one in any subgroup; a pair that does is
nested in neither direction (crossing_refutes_both). With sampling noise a reversal is
evidence only when it is significant, so each is tested (one-sided, difference of proportions)
and the p-values are adjusted across every comparison made.
Arguments
- judge
Judge of each case.
- d
0/1 decision (1 = detained or incarcerated).
- group
Subgroup of each case (an offence category, a year).
- min_n
Smallest number of a judge's cases in a subgroup for that cell to be compared.
- adjust
Multiple-comparison adjustment passed to
p.adjust.- alpha
Level at which an adjusted reversal counts as significant.
Value
A list: judges (overall rate and cases per judge), comparisons (one row
per pair and subgroup compared, stricter-overall judge first, with the subgroup rates, the
z statistic for the reversal, raw and adjusted p-values), summary (comparisons,
reversals, significant reversals, the pairs and judges involved), by_group (per
subgroup: judges compared and the slope of the subgroup rate on the overall rate, the
average-monotonicity check) and theorems.
Examples
set.seed(1)
judge <- sample(sprintf("J%02d", 1:8), 4000, replace = TRUE)
strict <- setNames(seq(0.2, 0.6, length.out = 8), sprintf("J%02d", 1:8))
group <- sample(c("drugs", "theft", "weapons"), 4000, replace = TRUE)
d <- rbinom(4000, 1, strict[judge])
r <- morie_judge_monotonicity(judge, d, group)
r$summary
#> comparisons reversed share_reversed significant pairs_refuted judges_involved
#> 1 84 2 0.02380952 0 0 0