# Estimation/Capture-Recapture

This learning resource is about the Capture and Recapture method, that is commonly used in ecology to estimate an animal population's size where it is impractical or impossible to count every individual. A portion of the population is captured, marked, and released. Later, another portion will be captured and the number of marked individuals within the sample is counted.

## Learning Tasks

* Analyze the requirements and constraints in the epidemiological context of COVID-19. How can the capture-recapture methodology be applied on the estimation of the total number of infection in the population. Explain the challenges according to the available data and performed tests!
* Assume you want to estimate the total number of the population of an animal like the Wild Boar. You capture a specific number of animals with a trap, you mark them and then you release them again. Later on you capture again a specific number of Wild Boars and you count the number of marked animals that are recaptured. Animals remember the experience with the trap and the probability to recapture a marked Wild Boar is lower that the probability of an unmarked Wild Boars. Explain the impact of overestimation or underestimation of the number of animals in the observed habitat.

## Example

* 100 individuals of the population is captured, marked, and released. Next time only 96 individual of the population could be captured and among those 96 individuals 16 individuals were marked.
* ($N=?$ unknown estimated total number in the population) $N$ is the estimated total number of individuals in population. The real number of population $N_{t}$ at time $t$ is in general unknown.
* ($M=100$ know number of marked individuals - first visit) due to the fact that the researcher marks the captured individuals, the number of marked individuals is know. This is the number of individuals in the population that were marked during the first sampling.
* ($n=96$ know number of individuals - second visit) the number of individuals captured in the second sampling might be different from number of the first visit.
* ($m=16$ know number of marked individuals - second visit) 16 are marked from 96 in the second visit.
       ${\frac {N}{M}}={\frac {N}{100}}={\frac {96}{16}}={\frac {n}{m}}\quad \Rightarrow \quad N={\frac {96}{16}}\cdot 100=600$

## Assumption of Proportionality

With the assumption that the number of marked individuals within the second sample is proportional to the number of marked individuals in the whole population, an estimate of the total population size can be obtained by dividing the number of marked individuals by the proportion of marked individuals in the second sample. This assumption may not be justified in all cases due to the fact e.g. animals that were marked and caught with a trap learn from that experience and this might reduce the probability that they were caught a second time. This will lead to an overestimation of the population.

## Terminology

The method is most useful when it is not practical to count all the individuals in the population. Other names for this method, or closely related methods, include capture-recapture, capture-mark-recapture, mark-recapture, sight-resight, mark-release-recapture, multiple systems estimation, band recovery, the Petersen method, and the Lincoln method.

## Application in Epidemiology

Another major application for these methods is the domain of epidemiology, where they are used to estimate the completeness of ascertainment of disease registers. Typical applications include estimating the number of people needing particular services (i.e. services for children with learning disabilities, services for medically frail elderly living in the community), or with particular conditions (i.e. illegal drug addicts, people infected with HIV, etc.).
* 96 individuals of the population are tested (e.g. PCR test). As a simplication all tested people are randomly selected from the total population (testing just the peopble that show COVID-19 symptoms like cold, fever, ... creates a bias for the estimation). People are asked if they would join the study. From this sample of the population (captured for testing) the number of infected are determined, e.g. among those 100 individuals 16 individuals are regarded as marked (infected). What are possible challenges for that approach?
* Keep in mind, that the total number of marked (infected) individuals is unknown. For the estimation of population size e.g. of animals in ecology the number of marked individuals is known and the total population is unknown. In this context the known and the unknown values are swapped.
* So with that approach the ratio between tested and infected/marked could be applied to the ratio between total population and the number of infected.
* As long as test capacity is limited, the selected cohort for testing might not be randomly selected (e.g. patients working in specific job in health care or people that show specific symptoms,...).
* ($N=300000$ estimated total number with a specific requirements or properties in the population - population view) $N$ is the estimated total number of individuals in population that have specific requirements or properties. An example could be the number of people showing symptons of cough and fever. The actual number $N_{t}$ of population at time $t$ is in general unknown.
* ($I=?$ unknown number of infected individuals in the population - population view) due to the fact that the researcher wants to know the number of infected people amoung the $N$ tested individuals. The total number of marked individuals is know. This is the number of individuals in the population that were marked during the first sampling.
* ($n_{t}=96$ known number of tested individuals - tested subgroup of the population at time $t$) the number of individuals tested in this sampling are selected in a way that they share the same specific requirements or properties as the considered group of $N$ individuals in the prior sampling. Keep in mind, that are in the real number individuals in the group with $N$ be different from number of the first visit.
* ($i_{t}=16$ known number of infected individuals - in the test at time $t$) 16 are infected from 96 people in the tested group of individuals.
       ${\frac {N}{M}}={\frac {300000}{M}}={\frac {96}{16}}={\frac {n_{t}}{i_{t}}}\quad \Rightarrow \quad M={\frac {16}{96}}\cdot 300000=50000$
The challenge is to estimate the total number in the population with specific requirements or properties, i.e. the number in the population that show e.g. both symptoms cough and fever. The group of tested individuals e.g. for COVID-19 is not representative for total population. E.g. asymptomatic patients were not tested and do not popup in the health system for testing. Furthermore the health care staff might be tested without symptoms due to their exposure to vulnerable patients. The total number of tested people must be devided into people that show COVID-19 symptoms and therefore the group of $N=300000$ individuals must be the estimated value of citizens that show COVID-19 symptoms. Furthermore he group of $N=300000$ individuals may not be tested due to the limitation of the test capacity in the considered reqion and only a fraction of the population may pop up in the health system. How can you control the cohort and what are your conclusions for the capture-recapture estimation. How does the limitation of test capacity has an impact on the tested fraction of the total population.

### Learning Task

* How can researchers collect data in a study that allows to esitmate the number $N$?
* Is it possible to use a citizen science approach for the estimation? What are the challenges and drawbacks?
* How do you check, if the sample size is sufficient enough for your estimation of $N$ and $I$?
* What are possible constraints for the Capture-Recapture method, that modify probabilty of recapture in comparison the probabilty of capturing a specific individual?

## Field work related to mark-recapture

Typically a researcher visits a study area and uses traps to capture a group of individuals alive. Each of these individuals is marked with a unique identifier (e.g., a numbered tag or band), and then is released unharmed back into the environment. A mark recapture method was first used for ecological study in 1896 by C.G. Johannes Petersen to estimate plaice, Pleuronectes platessa, populations.
Sufficient time is allowed to pass for the marked individuals to redistribute themselves among the unmarked population.
Next, the researcher returns and captures another sample of individuals. Some individuals in this second sample will have been marked during the initial visit and are now known as recaptures. Other animals captured during the second visit, will not have been captured during the first visit to the study area. These unmarked animals are usually given a tag or band during the second visit and then are released.
Population size can be estimated from as few as two visits to the study area. Commonly, more than two visits are made, particularly if estimates of survival or movement are desired. Regardless of the total number of visits, the researcher simply records the date of each capture of each individual. The "capture histories" generated are analyzed mathematically to estimate population size, survival, or movement.

## Notation

Let
    N = Number of animals in the population
    n = Number of animals marked on the first visit
    K = Number of animals captured on the second visit
    k = Number of recaptured animals that were marked
A biologist wants to estimate the size of a population of turtles in a lake. She captures 10 turtles on her first visit to the lake, and marks their backs with paint. A week later she returns to the lake and captures 15 turtles. Five of these 15 turtles have paint on their backs, indicating that they are recaptured animals. This example is (n, K, k) = (10, 15, 5). The problem is to estimate N. N=n*K/k

## Lincoln–Petersen estimator

The Lincoln–Petersen method (also known as the Petersen–Lincoln index or Lincoln index) can be used to estimate population size if only two visits are made to the study area. This method assumes that the study population is "closed". In other words, the two visits to the study area are close enough in time so that no individuals die, are born, or move into or out of the study area between visits. The model also assumes that no marks fall off animals between visits to the field site by the researcher, and that the researcher correctly records all marks.
Given those conditions, estimated population size is:
    ${\hat {N}}={\frac {Kn}{k}},$

### Derivation

It is assumed that all individuals have the same probability of being captured in the second sample, regardless of whether they were previously captured in the first sample (with only two samples, this assumption cannot be tested directly).
This implies that, in the second sample, the proportion of marked individuals that are caught ($k/K$) should equal the proportion of the total population that is marked ($n/N$). For example, if half of the marked individuals were recaptured, it would be assumed that half of the total population was included in the second sample.
In symbols,
    ${\frac {k}{K}}={\frac {n}{N}}.$
A rearrangement of this gives
    ${\hat {N}}={\frac {Kn}{k}},$
the formula used for the Lincoln–Petersen method.

### Sample calculation

In the example (n, K, k) = (10, 15, 5) the Lincoln–Petersen method estimates that there are 30 turtles in the lake.
    ${\hat {N}}={\frac {Kn}{k}}={\frac {10\times 15}{5}}=30$

## Chapman estimator

The Lincoln–Petersen estimator is asymptotically unbiased as sample size approaches infinity, but is biased at small sample sizes. An alternative less biased estimator of population size is given by the Chapman estimator:
    ${\hat {N}}_{C}={\frac {(K+1)(n+1)}{k+1}}-1$

### Sample calculation

The example (K, n, k) = (10, 15, 5) gives
    ${\hat {N}}_{C}={\frac {(K+1)(n+1)}{k+1}}-1={\frac {11\times 16}{6}}-1=28.3$
Note that the answer provided by this equation must be truncated not rounded. Thus, the Chapman method estimates 28 turtles in the lake.
Surprisingly, Chapman's estimate was one conjecture from a range of possible estimators: "In practice, the whole number immediately less than (K+1)(n+1)/(k+1) or even Kn/(k+1) will be the estimate. The above form is more convenient for mathematical purposes."(see footnote, page 144). Chapman also found the estimator could have considerable negative bias for small Kn/N(page 146), but was unconcerned because the estimated standard deviations were large for these cases.

## Confidence interval

An approximate $100(1-\alpha )\%$ confidence interval for the population size N can be obtained as:
$K+n-k-0.5+{\frac {(K-k+0.5)(n-k+0.5)}{(k+0.5)}}\exp(\pm z_{\alpha /2}{\hat {\sigma }}_{0.5})$,
where z$_{α/2}${\textstyle z_{\alpha /2}} corresponds to the $1-\alpha /2$ quantile of a standard normal random variable, and
${\hat {\sigma }}_{0.5}={\sqrt {{\frac {1}{k+0.5}}+{\frac {1}{K-k+0.5}}+{\frac {1}{n-k+0.5}}+{\frac {k+0.5}{(n-k+0.5)(K-k+0.5)}}}}$.
It has been shown that this confidence interval has actual coverage probabilities that are close to the nominal $100(1-\alpha )\%$ level even for small populations and extreme capture probabilities (near to 0 or 1), in which cases other confidence intervals fail to achieve the nominal coverage levels.

## Bayesian estimate

The mean value ± standard deviation is
    $N\approx \mu \pm {\sqrt {\mu \epsilon }}$
where
    $\mu ={\frac {(K-1)(n-1)}{k-2}}$ for $k>2$
    $\epsilon ={\frac {(K-k+1)(n-k+1)}{(k-2)(k-3)}}$ for $k>3$
A derivation is found here: Wikipedia:Talk:Mark and recapture#Statistical treatment.
The example (K, n, k) = (10, 15, 5) gives the estimate N ≈ 42 ± 21.5

## Capture probability

The capture probability refers to the probability of a detecting an individual animal or person of interest, and has been used in both ecology and epidemiology for detecting animal or human diseases, respectively.
The capture probability is often defined as a two-variable model, in which f is defined as the fraction of a finite resource devoted to detecting the animal or person of interest from a high risk sector of an animal or human population, and q is the frequency of time that the problem (e.g., an animal disease) occurs in the high-risk versus the low-risk sector. For example, an application of the model in the 1920s was to detect typhoid carriers in London, who were either arriving from zones with high rates of tuberculosis (probability q that a passenger with the disease came from such an area, where q>0.5), or low rates (probability 1-q). It was posited that only 5 out of every 100 of the travelers could be detected, and 10 out of every 100 were from the high risk area. Then the capture probability P was defined as:
    $P={\frac {5}{10}}fq+{\frac {5}{90}}(1-f)(1-q),$
where the first term refers to the probability of detection (capture probability) in a high risk zone, and the latter term refers to the probability of detection in a low risk zone. Importantly, the formula can be re-written as a linear equation in terms of f:
    $P=\left({\frac {5}{10}}q-{\frac {5}{90}}(1-q)\right)f+{\frac {5}{90}}(1-q).$
Because this is a linear function, it follows that for certain versions of q for which the slope of this line (the first term multiplied by f) is positive, all of the detection resource should be devoted to the high-risk population (f should be set to 1 to maximize the capture probability), whereas for other value of q, for which the slope of the line is negative, all of the detection should be devoted to the low-risk population (f should be set to 0. We can solve the above equation for the values of q for which the slope will be positive to determine the values for which f should be set to 1 to maximize the capture probability:
    $\left({\frac {5}{10}}q-{\frac {5}{90}}(1-q)\right)>0,$
which simplifies to:
    $q>{\frac {1}{10}}.$
This is an example of linear optimization. In more complex cases, where more than one resource f is devoted to more than two areas, multivariate optimization is often used, through the simplex algorithm or its derivatives.

## More than two visits

The literature on the analysis of capture-recapture studies has blossomed since the early 1990s[citation needed]. There are very elaborate statistical models available for the analysis of these experiments. A simple model which easily accommodates the three source, or the three visit study, is to fit a Poisson regression model. Sophisticated mark-recapture models can be fit with several packages for the Open Source R programming language. These include "Spatially Explicit Capture-Recapture (secr)", "Loglinear Models for Capture-Recapture Experiments (Rcapture)", and "Mark-Recapture Distance Sampling (mrds)". Such models can also be fit with specialized programs such as MARK or M-SURGE.
Other related methods which are often used include the Jolly–Seber model (used in open populations and for multiple census estimates) and Schnabel estimators (described above as an expansion to the Lincoln–Petersen method for closed populations). These are described in detail by Sutherland.

## Integrated approaches

Modelling mark-recapture data is trending towards a more integrative approach, which combines mark-recapture data with population dynamics models and other types of data. The integrated approach is more computationally demanding, but extracts more information from the data improving parameter and uncertainty estimates.