| Title: | Extinction Risk Estimation |
|---|---|
| Description: | Estimates extinction risk from population time series under a drifted Wiener process using MLE and observation-error-and-autocovariance-robust estimators, with confidence intervals based on the w-z method. |
| Authors: | Hiroshi Hakoyama [aut, cre, cph] (ORCID: <https://orcid.org/0000-0001-7464-0754>) |
| Maintainer: | Hiroshi Hakoyama <[email protected]> |
| License: | BSD_2_clause + file LICENSE |
| Version: | 1.1.1 |
| Built: | 2026-06-09 08:19:48 UTC |
| Source: | https://github.com/hakoyamah/extr |
Estimates demographic parameters and extinction probability under a
density-independent (drifted Wiener) model. From a time series of
population sizes, it estimates growth rate and variance using
either a naive MLE variance estimator or an
observation-error-and-autocovariance-robust (OEAR) estimator, then evaluates
extinction risk over a horizon with confidence intervals
from the – method.
In the observation-error-free setting, the naive – interval
achieves near-nominal coverage, while OEAR can be more robust under additive
observation error and unknown short-run autocovariance.
ext_di( dat, ne = 1, th = 100, alpha = 0.05, unit = "years", qq_plot = FALSE, formatted = TRUE, digits = getOption("extr.digits", 5L), method = c("naive", "oear") )ext_di( dat, ne = 1, th = 100, alpha = 0.05, unit = "years", qq_plot = FALSE, formatted = TRUE, digits = getOption("extr.digits", 5L), method = c("naive", "oear") )
dat |
Data frame with two numeric columns: time (strictly increasing) and population size. Column names are not restricted. |
ne |
Numeric. Extinction threshold |
th |
Numeric. Time horizon |
alpha |
Numeric. Significance level |
unit |
Character. Unit of time (e.g., "years", "days", "generations"). Default is "years". |
qq_plot |
Logical. If |
formatted |
Logical. If |
digits |
Integer. Preferred significant digits for printing. Affects
display only. Default is |
method |
Character. Variance estimation method.
|
Population dynamics follow
where
and is a Wiener process. Extinction risk is
the probability that population size falls below within
. Irregular observation intervals are allowed.
The function first estimates , then estimates a variance quantity
according to method:
naive: uses the drifted-Wiener MLE variance
(Dennis et al., 1991).
oear: uses an observation-error-and-autocovariance-robust
(OEAR) HAC long-run-variance estimator with AR(1) pre-whitening and a
Bartlett kernel (Hakoyama, in press).
For method = "oear", robustness to additive observation error relies
on long-run-variance cancellation of differenced observation error
(McNamara and Harding, 2004), while robustness to unknown short-run
autocovariance comes from HAC estimation of long-run variance.
Extinction probability is then computed as
(Lande and Orzack, 1988), and confidence intervals are constructed using
the – method (Hakoyama, in press).
A list (class "ext_di" when formatted=TRUE) containing
extinction-risk estimates and diagnostics.
Core elements include Growth.rate, Variance,
Unbiased.variance, lower_cl_s, upper_cl_s,
linear_g, log_g, log_q,
ci_linear_g, ci_log_g, ci_log_q,
and data/input summaries (nq, xd, sample.size,
unit, ne, th, alpha).
Variance is method-dependent (naive MLE for method="naive",
OEAR HAC estimate for method="oear").
aic is reported only for method="naive" and is NA
for method="oear".
method_diag is NULL for naive and contains
rho_tilde_pw and j for oear.
lower_cl_s and upper_cl_s are chi-square based:
exact under method="naive" model assumptions, and pragmatic
plug-in approximations for method="oear".
Andrews, D. W. K. (1991). Heteroskedasticity and autocorrelation consistent covariance matrix estimation. Econometrica, 59(3), 817-858.
Dennis, B., Munholland, P.L., and Scott, J.M. (1991) Estimation of growth and extinction parameters for endangered species. Ecological Monographs, 61, 115-143.
Hakoyama, H. Confidence intervals for extinction risk: validating population viability analysis with limited data. Methods in Ecology and Evolution. In press. Preprint, doi:10.48550/arXiv.2509.09965
Lande, R. and Orzack, S.H. (1988) Extinction dynamics of age-structured populations in a fluctuating environment. Proceedings of the National Academy of Sciences, 85(19), 7418–7421.
McNamara, J. M. and Harding, K. C. (2004). Measurement error and estimates of population extinction risk. Ecology Letters, 7(1), 16-20.
Newey, W. K. and West, K. D. (1987). A simple, positive semi-definite, heteroskedasticity and autocorrelation consistent covariance matrix. Econometrica, 55(3), 703-708.
statistics_di, oear_sigma2_hac,
extinction_probability_di,
confidence_interval_wz_di, print.ext_di
# Example from Dennis et al. (1991), Yellowstone grizzly bears. # Population is a running 3-year sum (3-year moving total) digitized from # Fig. 5. dat <- data.frame(Time = 1959:1987, Population = c(44, 47, 46, 44, 46, 45, 46, 40, 39, 39, 42, 44, 41, 40, 33, 36, 34, 39, 35, 34, 38, 36, 37, 41, 39, 51, 47, 57, 47)) # Probability of decline to 1 individual within 100 years ext_di(dat, th = 100) # Probability of decline to 10 individuals within 100 years ext_di(dat, th = 100, ne = 10) # With QQ-plot ext_di(dat, th = 100, ne = 10, qq_plot = TRUE) # OEAR method ext_di(dat, th = 100, method = "oear") # Irregularly spaced observations: ML method # Under the drifted Wiener process model, the ML method uses the exact # likelihood for the observed time intervals; no interpolation is needed. dat_irregular <- subset(dat, Time %in% c(1959, 1960, 1962, 1965, 1969, 1974, 1980, 1987)) ext_di(dat_irregular, th = 100, ne = 10) # A mostly complete annual series with a few missing observations # can also be supplied using NA values. The ML method then uses the # observed intervals between non-missing observations. dat_with_na <- data.frame( Time = 1959:1975, Population = c(44, 47, NA, 44, 46, 45, 46, NA, 39, 39, 42, 44, NA, 40, 33, 36, 34) ) ext_di(dat_with_na, th = 100, ne = 10) # OEAR method with mild missingness # Unlike the ML method above, OEAR is an effective-diffusion approximation # based on the long-run variance of increments. Mild missingness is # acceptable, but avoid using method = "oear" when missing observations # are numerous or observation intervals are highly heterogeneous. ext_di(dat_with_na, th = 100, ne = 10, method = "oear")# Example from Dennis et al. (1991), Yellowstone grizzly bears. # Population is a running 3-year sum (3-year moving total) digitized from # Fig. 5. dat <- data.frame(Time = 1959:1987, Population = c(44, 47, 46, 44, 46, 45, 46, 40, 39, 39, 42, 44, 41, 40, 33, 36, 34, 39, 35, 34, 38, 36, 37, 41, 39, 51, 47, 57, 47)) # Probability of decline to 1 individual within 100 years ext_di(dat, th = 100) # Probability of decline to 10 individuals within 100 years ext_di(dat, th = 100, ne = 10) # With QQ-plot ext_di(dat, th = 100, ne = 10, qq_plot = TRUE) # OEAR method ext_di(dat, th = 100, method = "oear") # Irregularly spaced observations: ML method # Under the drifted Wiener process model, the ML method uses the exact # likelihood for the observed time intervals; no interpolation is needed. dat_irregular <- subset(dat, Time %in% c(1959, 1960, 1962, 1965, 1969, 1974, 1980, 1987)) ext_di(dat_irregular, th = 100, ne = 10) # A mostly complete annual series with a few missing observations # can also be supplied using NA values. The ML method then uses the # observed intervals between non-missing observations. dat_with_na <- data.frame( Time = 1959:1975, Population = c(44, 47, NA, 44, 46, 45, 46, NA, 39, 39, 42, 44, NA, 40, 33, 36, 34) ) ext_di(dat_with_na, th = 100, ne = 10) # OEAR method with mild missingness # Unlike the ML method above, OEAR is an effective-diffusion approximation # based on the long-run variance of increments. Mild missingness is # acceptable, but avoid using method = "oear" when missing observations # are numerous or observation intervals are highly heterogeneous. ext_di(dat_with_na, th = 100, ne = 10, method = "oear")