
Selective labels: what a release rule's failure rate can be known from released cases
Source:R/selective_labels.R
morie_selective_labels.RdOutcomes (a missed court date, a new arrest) are observed only for the
defendants a judge released. A proposed rule releases a set M; its
failure rate is identified only through the released part \(M \cap R\):
exactly when \(M \subseteq R\) (the contraction case,
Research.P18.nested_rate_identified), and otherwise only up to the
interval \([\mathrm{fails}(M\cap R)/w(M),\ (\mathrm{fails}(M\cap R) + w(M \setminus R))/w(M)]\),
both ends attainable, of width equal to the unobserved share
(unobserved_bounds, unobserved_width,
unobserved_ends_attained). The naive estimate, the failure rate on
\(M \cap R\) alone, is reported beside the interval; it is a point inside
the interval chosen by assumption.
Value
A list with observed_rate (among the judge's released),
rule_share_unobserved, identified (whether the rule's set is
inside the released set), rule_rate (when identified), bounds,
width, naive_rate and theorems.
Examples
set.seed(4)
n <- 500; risk <- runif(n); y <- rbinom(n, 1, risk)
released <- risk < 0.7 # the judge detains the riskiest 30 percent
rule <- risk < 0.6 # a stricter rule: inside the judge's releases
morie_selective_labels(y, released, rule)[c("identified", "rule_rate")]
#> $identified
#> [1] TRUE
#>
#> $rule_rate
#> [1] 0.2993421
#>
rule2 <- risk < 0.8 # a more lenient rule: part of it is unobserved
morie_selective_labels(y, released, rule2)[c("bounds", "width", "naive_rate")]
#> $bounds
#> lower upper
#> 0.3069054 0.4271100
#>
#> $width
#> [1] 0.1202046
#>
#> $naive_rate
#> [1] 0.3488372
#>