pymc-devs / pymc-devs/pymc-examples
Estimating population size with capture-recapture
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 398
- Forks
- 325
- Avg merge
- 9d 15m
- Merged PRs (30d)
- 1
Description
Notebook proposal
Title: Estimating population size with capture-recapture
Why should this notebook be added to pymc-examples?
There are few notebooks on ecology in the examples gallery. While most ecologists do Bayesian statistics via R (e.g., with Stan, Nimble, or BUGS/JAGS), some might be interested in what PyMC has to offer. Moreover, many ecological models involve discrete latent states, and thus might be a good examples for showcasing pymc_extras.marginalize().
I propose adding a notebook about estimating the size of a closed population with capture-recapture, one of the most common tasks in ecology. This would be a great example for demonstrating pymc_extras.recover_marginals() and az.compare(). Moreover, capture-recapture is also used in epidemiology and public policy to estimate the size of hard to reach populations (e.g., the unhoused).
Suggested categories:
- Level: intermediate
- Diataxis type: How-to
Related notebooks
These models are quite similar to the occupancy model presented in this notebook. Nevertheless, the inferential goals are completely different, and would thus showcase different aspects of PyMC. For example, this notebook would make heavy use of pymc_extras.recover_marginals(), since the objective is to estimate the posterior of abundance (i.e., the sum of the discrete latent state).
References
This notebook on closed capture-recapture
Royle, J.A., 2009. Analysis of capture–recapture models with individual covariates using data augmentation. Biometrics, 65(1), pp.267-274.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the related occupancy notebook and the linked closed capture-recapture reference. Build the proposed intermediate How-to notebook around closed-population capture-recapture, using pymc_extras.recover_marginals() and az.compare() as described; it is done when the notebook estimates posterior abundance and fits the suggested examples-gallery categories.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100