MacKenzie 2002 - Occupancy Model and Likelihood
Summary
Sites are closed during visits; a site is occupied with probability and, if occupied, the species is detected on visit with probability (never falsely detected). The all-zero history has a two-part probability, “occupied but missed” plus “absent”, and this mixture separates from .
Overview
Notation: presence probability at site ; detection probability at site , occasion , given presence; surveyed sites; occasions; sites with a detection at ; sites with at least one detection.
Sampling assumptions
(1) Sites are closed: none becomes occupied or abandoned during the survey period. (2) The species is never falsely detected when absent. (3) Detection at a site is independent of detection at other sites. Data per site are a 0/1 vector of detection histories.
Main Content
Analogy to closed-population capture-recapture
Sites play the role of individuals, except that the number of “never captured” sites is observed (the total is known); what is unknown is the share truly occupied. Applying a classical closed-population model (Concept - Closed-Population Capture-Recapture and Otis Models) to the detected sites only would estimate the number of occupied sites, but the occupancy formulation also lets depend on covariates.
Site-level likelihood
For a site with at least one detection (e.g. history 01010):
For a never-detected site (00000):
The model likelihood is the product over independent sites.
With fully site-specific the likelihood is over-parameterised; the probabilities must be constant or modelled through covariates.
Constant-parameter likelihood (Eq. 1)
With and constant across sites,
Only and are needed, so it can be maximised in a spreadsheet.
Why the factorisation holds. The sites with a detection must be occupied; each contributes times a Bernoulli product over its visits, and collecting visit-wise terms gives . The all-zero sites each contribute the mixture term.
Standard errors
The authors recommend the nonparametric bootstrap (resample sites with replacement, refit, take the SD of estimates; Buckland and Garthwaite 1991) over asymptotic second-derivative variances, because the asymptotic value is a lower bound and may be too small in small samples.
Covariates (Eq. 2-3)
Logistic covariate models
For a parameter with covariate matrix and coefficient vector :
With covariates on , the average presence probability is (Eq. 3). Covariates for must be site-specific and time-constant (closure); covariates for may be time-varying and site-specific (e.g. temperature).
Contrast with mark-recapture: there, a time-varying individual covariate is observed only when the individual is captured. Here, site covariates can be recorded on every visit whether or not the species is detected. Time-varying covariates that cannot be measured independently of the detection process are not allowed.
Missing observations
If site is not sampled on occasion , that occasion contributes no factor. Example: history 10-11 (no sampling at time 3) has likelihood . This works only with the per-site likelihood, not the pooled Eq. 1.
Examples
Worked example: how much does non-detection tell us?
Setup. , , constant (illustrative, not from the paper). Solution. . By Bayes, . Interpretation. After five empty visits a site still has a 14% chance of being occupied; the naive estimator treats this as 0%, which is its source of negative bias.
import numpy as np
from scipy.optimize import minimize
def nll(theta, n_t, n_dot, N):
psi = 1/(1+np.exp(-theta[0])); p = 1/(1+np.exp(-theta[1:]))
ll = n_dot*np.log(psi) + np.sum(n_t*np.log(p) + (n_dot-n_t)*np.log1p(-p))
ll += (N-n_dot)*np.log(psi*np.prod(1-p) + 1-psi)
return -ll
rng = np.random.default_rng(1)
N, T, psi, p = 200, 5, 0.6, 0.3
z = rng.random(N) < psi
y = (rng.random((N, T)) < p) & z[:, None]
n_t, n_dot = y.sum(0).astype(float), y.any(1).sum()
fit = minimize(nll, np.zeros(1+T), args=(n_t, n_dot, N))
print("psi_hat =", 1/(1+np.exp(-fit.x[0])), " naive =", n_dot/N)Connections
- The all-zero mixture term is the zero-inflation device in Monsters and Mixtures; marginalising the binary latent state is the simplest case of Concept - Marginalising Latent Discrete Counts for HMC.
- Site effects with partial pooling extend the model: Hierarchical Models.