Skip to contents

Under random mixing the expected number of A-on-B offences is \(k p_A p_B N\), so the conventional "A-on-B rate per A resident" equals \(k p_B\): a linear function of percent B with no behavioural content (Research.P2.rate_per_offender_group, null_slope_positive), and the ratio of the two dyadic per-offender-group rates is \(p_B/p_A\) (dyad_ratio). Per pair-exposure \(p_A p_B N\) the null rate is a constant for every composition (pair_exposure_rate_constant), so that is the denominator a test of differential targeting needs (Stolzenberg, Eitle & D'Alessio 2006 use the offender-group denominator).

Usage

morie_interracial_rates(offences, population)

Arguments

offences

Named numeric vector of dyad counts, names like "A_on_B": offender group, "_on_", victim group.

population

Named numeric vector of group populations (all groups appearing in offences).

Value

A data frame with one row per dyad: offender, victim, count, rate_per_offender_group, rate_per_pair_exposure (count over \(p_A p_B N\)), null_rate_per_offender_group (what random mixing at the pooled pair-exposure rate predicts) and ratio_to_null; attribute "theorems".

Examples

morie_interracial_rates(c(A_on_B = 120, B_on_A = 200, A_on_A = 900, B_on_B = 300),
                        population = c(A = 80000, B = 20000))
#>   offender victim count rate_per_offender_group rate_per_pair_exposure
#> 1        A      B   120                 0.00150              0.0075000
#> 2        B      A   200                 0.01000              0.0125000
#> 3        A      A   900                 0.01125              0.0140625
#> 4        B      B   300                 0.01500              0.0750000
#>   null_rate_per_offender_group ratio_to_null
#> 1                      0.00304     0.4934211
#> 2                      0.01216     0.8223684
#> 3                      0.01216     0.9251645
#> 4                      0.00304     4.9342105