Latent Poisson (or NB) abundance with binomial detection per visit (Royle 2004).
Usage
abun(K_max = NULL, mixture = c("poisson", "negbin", "zip", "zinb"))Arguments
- 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
Royle's (2004) N-mixture model: latent abundance N_i ~ Poisson(lambda_i)
with log lambda_i = X_lambda beta_lambda, and counts
y_ij | N_i ~ Binomial(N_i, p_ij) with logit p_ij = X_p beta_p. The
abundance formula is the tobs() formula; the per-visit detection formula
is detection. The marginal likelihood integrates N out exactly, so the
fit is a direct Laplace approximation (no EM): method = "laplace"
(fixed effects) or method = "nested_laplace" (an areal icar() / bym2()
/ car() offset on the abundance arm).
Examples
# \donttest{
sim <- simulate_abun(N = 120, J = 4, n_abund_covs = 1, n_det_covs = 1, seed = 1)
fit <- tobs(~ abund_cov1, data = sim$data, family = abun(),
detection = ~ det_cov1, y = sim$y, method = "laplace")
summary(fit)
# }