
Selective labels across judges ordered by leniency
Source:R/selective_labels.R
morie_selective_labels_judges.RdWith several judges whose release sets are nested from the strictest to the
most lenient, a rule's identified interval shrinks with leniency
(Research.P18.chain_width_antitone): the most lenient judge gives
the sharpest interval, and the interval collapses to a point exactly when
the rule releases nobody that judge detained
(chain_width_zero_iff, chain_contraction). Judges need not
be nested; then the function reports the sharpest interval among them and
says the chain theorems do not apply.
Arguments
- y
Failure indicator (0/1) per defendant; only its values on
releasedare used.- released
Logical matrix with one column per judge (rows are defendants), or a list of logical vectors, ordered from strictest to most lenient.
- rule_released
Logical: released by the proposed rule.
- weights
Optional non-negative weights.
Value
A list with judges (a data frame: release share, interval,
width and whether the rule is identified, one row per judge),
nested, best (the judge with the narrowest interval),
identified, rule_rate (when identified), bounds,
width and theorems.
Examples
set.seed(5)
n <- 400; risk <- runif(n); y <- rbinom(n, 1, risk)
judges <- cbind(strict = risk < 0.5, middle = risk < 0.7, lenient = risk < 0.85)
morie_selective_labels_judges(y, judges, rule_released = risk < 0.8)$judges
#> judge release_share lower upper width identified
#> 1 strict 0.5350 0.1688312 0.4740260 0.3051948 FALSE
#> 2 middle 0.6875 0.2857143 0.3928571 0.1071429 FALSE
#> 3 lenient 0.8475 0.3766234 0.3766234 0.0000000 TRUE