Capture-recapture model (source code)

= Capture-recapture model

A <capture-recapture model> is a <statistical model> for repeated observations of identifiable individuals, including those missed on some occasions. A <closed-population capture-recapture model> estimates a fixed population <cardinality>; models allowing individuals to enter or leave can instead describe survival and recruitment. The sampling assumptions determine which <likelihood function> is appropriate.

For the two-sample <closed-population capture-recapture model>, condition on the <sample sizes> $M$ and $C$. If the second sample selects $C$ distinct individuals from $N$ by <simple random sampling>, then the overlap $R$ has the <hypergeometric distribution>:
$$
\mathbb P(R=r\mid N,M,C)
=\frac{\binom Mr\binom{N-M}{C-r}}{\binom NC},
\qquad \max(0,M+C-N)\leq r\leq\min(M,C).
$$
Here $r$ is an <integer> and the <probability mass function> is zero outside these bounds. The <binomial coefficients> count choices of $r$ marked and $C-r$ unmarked individuals, divided by all equally likely size-$C$ <subsets>. The <hypergeometric distribution> has <expected value>
$$
\mathbb E[R\mid N,M,C]=\frac{MC}{N}.
$$
Equating the observed overlap with this <expected value> gives the <Lincoln-Petersen estimator>. The underlying <sampling without replacement>, <probability mass function>, and <expected value> are developed in https://web.mit.edu/14.380/www/handouts/hypergeometric.pdf[Raymond P. Guiteras, MIT 14.30 hypergeometric distribution handout, §§1–4 and 8].

For the toy counts $M=20$, $C=25$, and $R=5$, hold the observations fixed and vary the unknown <integer> $N$. The <likelihood function> is
$$
L(N)=\frac{\binom{20}{5}\binom{N-20}{20}}{\binom N{25}},
\qquad N=40,41,42,\ldots.
$$
Values below forty cannot contain the observed <set union>. Exact comparison of consecutive <likelihoods> gives two tied <maximum-likelihood estimates>, $N=99$ and $N=100$. The <Lincoln-Petersen estimator> returns $100$; the <Chapman estimator> returns $90$ and is a different rule for <estimation>.

\Image[/mark-recapture-population-likelihood.png]
{title=Relative likelihood for the toy overlap: integer maxima at 99 and 100, ratio estimate 100, and Chapman estimate 90}

The vertical scale is $L(N)/\max_{n\geq40}L(n)$. This relative <likelihood> compares how well candidate <statistical parameters> explain the same observations; it is not a <posterior probability>. The displayed range $40\leq N\leq300$ is only a plotting window. The <likelihood function> remains positive for every <integer> $N\geq40$ and tends to zero as $N$ increases, so the curve has a continuing right tail. The data do not justify truncating <statistical inference> at three hundred. The conditional <hypergeometric distribution> formulation also appears in https://arxiv.org/html/2307.11705v1#S3[Louis-Paul Rivest and Mamadou Yauck, Small Sample Estimators for Two-way Capture Recapture Experiments, §3, equation (5)].

Zero recaptures require care. With $R=0$ and positive $M,C$, the <Lincoln-Petersen estimator> has no finite ratio, but the <capture-recapture model> still gives a valid <likelihood function>:
$$
L_0(N)=\frac{\binom{N-M}{C}}{\binom NC},
\qquad N\geq M+C.
$$
This <likelihood function> increases toward one as $N$ grows, so there is no finite <maximum-likelihood estimate>. For the same <sample sizes> twenty and twenty-five with zero overlap, forty-five distinct individuals would be observed. Lack of overlap supplies a lower bound but very weak information about large population <cardinalities>.

In more elaborate <capture-recapture models>, a first-recapture array $m_{ij}$ counts individuals released at occasion $i$ and next observed at $j$. A <probability> of survival $\phi_j$ and a <probability> of detection $P_{j+1}$ contribute a no-observation continuation factor $\phi_j(1-P_{j+1})$. The resulting <likelihood function> depends on both survival and detection; these <probabilities> need not be separately identifiable at the last observation interval. <Missing-count EM for capture-recapture> describes one way to fit such a model, and <identifiability> remains a separate issue from computing an <estimator> output.