Latent abundance N_i ~ Poisson(lambda_i) (or negative binomial) in a covered
region, observed through a half-normal or hazard-rate detection function over
distance bins. With B bins the detected counts are multinomial over
(bin 1, ..., bin B, undetected) with cell probabilities
pi_b = integral_bin g(x; sigma) f(x) dx and 1 - sum_b pi_b, where f(x) is
the distance density (uniform for a line transect, proportional to distance for
a point transect). The latent N is summed out in closed form (truncation
K_max), so the fit is a direct Laplace approximation (no EM), with a NUTS
path over the same marginal; the per-bin detection integrals are evaluated by
Gauss-Legendre quadrature.
Arguments
- key
detection-function key.
"halfnorm"(default) or"hazard"(the hazard-rate shapebis estimated as a scalar, reported aslog_shape).- transect
"line"(default; perpendicular distances uniform) or"point"(radial distances, density proportional to distance).- cutpoints
numeric distance-bin edges, length
n_bins + 1(0 = c_0 < c_1 < ... < c_B). Required.- K_max
upper bound for the latent-abundance marginal sum (the exact integration over
Nis truncated atK_max).NULL(default) lets the engine pickmax(y) + 100(matchingunmarked::pcount()); raise it if a fit warns that the posterior overNputs mass on the boundary.- mixture
latent-abundance distribution, both fitted via tulpa's closed-form marginal Laplace engine.
"poisson"is the default;"negbin"(negative binomial,Var(N) = lambda + lambda^2 / r) adds an overdispersion parameterr. Non-spatially the log sizelog_ris estimated jointly with the coefficients and reported with an SE; on the areal-spatial path (method = "nested_laplace")ris integrated over the outer hyperparameter grid and reported as a posterior mean / sd. Namedmixture(afterunmarked::pcount()) to avoid collision with the model-typefamilyargument oftobs().
Details
The tobs() formula is the abundance (log lambda) model; detection is
the site-level detection-scale (log sigma) model. The response y is an
n_sites x n_bins integer matrix of per-bin detected counts. The bin edges and
transect geometry travel with the family: distance(cutpoints = ...).
References
Buckland, S. T., Anderson, D. R., Burnham, K. P., Laake, J. L., Borchers, D. L., Thomas, L. (2001). Introduction to Distance Sampling. Oxford. Royle, J. A., Dawson, D. K., Bates, S. (2004). Modeling abundance effects in distance sampling. Ecology 85, 1591-1597.
Examples
# \donttest{
sim <- simulate_distance(N = 200, key = "halfnorm", transect = "line",
n_abund_covs = 1, n_sigma_covs = 1, seed = 1)
fit <- tobs(~ abund_cov1, data = sim$data,
family = distance(key = "halfnorm", transect = "line",
cutpoints = sim$cutpoints),
detection = ~ sigma_cov1, y = sim$y, method = "laplace")
summary(fit)
# }