nordet
Noisy-OR detection by patrols
nordet(x, off, radius, p = 0.85, draw = FALSE, seed = NULL)The chance that an incident is seen by patrols when each officer within
radius of it sees it independently with probability p: with k
officers in range, 1 - (1 - p)^k (the detection model of Barman and
Barman 2026). With draw = TRUE, one detection outcome is drawn for
each incident. A model of who is seen, under stated assumptions; how
patrols are actually placed and how much they see are matters of fact
the model does not settle.
Parameters
Section titled “Parameters”xThe incidents: a numeric matrix of two columns, or a data frame with columns
xandy(or two columns), planar coordinates.offThe officers, in the same forms;
NULLor no rows for none.radiusThe range: one positive number, in the coordinates’ units (distances are Euclidean; an officer exactly at
radiuscounts).pThe chance one officer in range sees an incident: one number above 0 and at most 1.
drawTRUEto draw whether each incident is detected.seedNULLto draw the seed of the detections from R’s generator, or one whole number from 0; read only withdraw.
Returns
Section titled “Returns”A data frame with one row per incident: k (officers in range),
prob and, with draw, det (1 detected, 0 not).
Examples
Section titled “Examples”set.seed(1)inc <- matrix(runif(20), ncol = 2)off <- matrix(runif(10), ncol = 2)nordet(inc, off, radius = 0.3, p = 0.7)Also in the R reference, with the method and its source.