Skip to contents

Outcomes (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.

Usage

morie_selective_labels(y, released, rule_released, weights = NULL)

Arguments

y

Failure indicator (0/1) per defendant; only its values on released are used.

released

Logical: released by the judge (outcome observed).

rule_released

Logical: released by the proposed rule.

weights

Optional non-negative weights.

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
#>