Skip to contents

Recorded outcomes per group (y) are rates per unit of exposure to police, and exposure is only known to lie within a factor gamma of an observed proxy m (mobility, presence, calls for service). The true rate of each group then lies in \([y/(\gamma m),\ \gamma y/m]\) and the ratio of two groups' true rates within \(\gamma^2\) of the proxy ratio, all ends attained (Research.P2.rate_bounds, Research.P2.disparity_bounds). The direction of the disparity is identified when the proxy ratio exceeds \(\gamma^2\) (Research.P2.disparity_sign_identified).

Usage

morie_disparity_exposure_bounds(y, m, gamma = 1, reference = names(y)[1])

Arguments

y

Named vector of recorded outcome counts, one per group.

m

Named vector of exposure proxies, same names.

gamma

Factor within which true exposure is assumed to lie; at least 1.

reference

Name of the reference group for ratios.

Value

A data frame with one row per group: y, m, proxy_rate, rate_lower, rate_upper, ratio_proxy, ratio_lower, ratio_upper and direction_identified.

Examples

morie_disparity_exposure_bounds(y = c(A = 300, B = 100), m = c(A = 1000, B = 1000),
                                gamma = 1.5, reference = "B")
#>   group   y    m proxy_rate rate_lower rate_upper ratio_proxy ratio_lower
#> 1     A 300 1000        0.3 0.20000000       0.45           3   1.3333333
#> 2     B 100 1000        0.1 0.06666667       0.15           1   0.4444444
#>   ratio_upper direction_identified
#> 1        6.75                 TRUE
#> 2        2.25                FALSE