Deriving abundance from a distance-sampling model

Did some digging, and there’s a very elegant solution here. To recap, here’s a reduced model that still leads us to the correct answer (from Kery and Royle, 2015 section 8.5.3).

For sites i=1, ..., n_{\text{site}}

N_i \sim \text{Poisson}(\lambda_i)

y_{i, .} \sim \text{Binomial}(N_i, \sum_k p_{k})

y_{i,1:K} \sim \text{Multinomial}(p_{1:K})

where N_i is the true abundance, y_{i, .} the number of observed individuals, y_{i, k} the number of observed individuals in distance bin k (and y_{i, .} = \sum_k y_{i, k}), and p_k is the probability that an animal occurs and is detected in distance bin k.

As @jmyeiser did we can analytically marginalize N_i out of the model via the Poisson-binomial hierarchy:

y_{i, .} \sim \text{Poisson}(\lambda_i \sum_k p_{k})

y_{i,1:K} \sim \text{Multinomial}(p_{1:K})

Then, using Bayes’ rule, we construct [N_i \mid y_{i, .}, \lambda, p_{1:K}]:

[N_i \mid y_{i, .}, \lambda, p_{1:K}] = \dfrac{[y_{i, .} \mid N_{i}, p_{1:K}] [N_i \mid \lambda_i]}{\sum_{j=y_{i, .}}^\infty [y_{i, .} \mid N_{i}, p_{1:K}] [N_i \mid \lambda_i]}

=\dfrac{\text{Binomial}(y_{i, .} \mid N_i, \sum_{k}p_{k}) \times \text{Poisson}(N_i \mid \lambda_i)}{\text{Poisson}(y_{i, .} \mid \lambda_i \sum_k p_k)}

plug in the expressions for the binomial and Poisson pmfs, do some algebra to find (perhaps suprisingly) that this yields a distribution for the number of animals not detected m_i = N_i - y_{i, .} (Royle and Dorazio (2008), equation 8.3.7):

m_i \sim \text{Poisson}(\lambda_i (1 - \sum_{k} p_k))

You can use this fact to easily get posterior draws of abundance, conditional on the observed number of individuals:

  1. In the generated quantities block, draw the number of “missed” individuals m_i
  2. then compute abundance via N_i = y_{i, .} + m_i.

Here’s some R & Stan code to simulate data, fit a Stan model, and draw samples for abundance using this result: Poisson-binomial multinomial distance sampling model in Stan, with half-normal detection function · GitHub

Refs:

Royle, J. Andrew, and Robert M. Dorazio. Hierarchical modeling and inference in ecology: the analysis of data from populations, metapopulations and communities . Elsevier, 2008.

Kéry, Marc, and J. Andrew Royle. Applied Hierarchical Modeling in Ecology: Analysis of distribution, abundance and species richness in R and BUGS: Volume 1: Prelude and Static Models . Academic Press, 2015.

6 Likes