Skip to contents

For each crime location, computes 1 - (1 - p_detect)^k where k is the number of officers within radius.

Usage

morie_fairness_noisy_or_detection(
  crime_xy,
  officer_xy,
  radius,
  p_detect = 0.85,
  seed = NULL
)

Arguments

crime_xy

Numeric (n, 2) matrix of crime coordinates.

officer_xy

Numeric (m, 2) matrix of officer coordinates.

radius

Detection radius (positive).

p_detect

Per-officer detection probability in (0, 1].

seed

Optional integer; when supplied, a Bernoulli outcome is sampled per crime and returned in $detected.

Value

morie_fairness_result with $probabilities, $officers_in_range, optional $detected.