Create a detection function

create_detector(FUN, ...)

Arguments

FUN

a probability density (or mass) function whose first two arguments must be x and y.

Value

a function(x, y, ...) where x and y are positions of population specimens within a segment. The FUN is used to compute the probabity that a specimens is detected, that is (\(Pr(D|x,y;\theta)\)), \(x,y\) are a specimen's position and \(\theta\) are additional parameters for the pdf (FUN). This function returns a 0/1 vector of length length(x) (or length(y) if x is missing), indicating whether specimens were not detected (1) or not (0).