Maximum-likelihood fit of the multistate false-positive occupancy model
Source:R/fp_occu.R
fp_occu_laplace.RdFits the Miller et al. (2011) false-positive occupancy model with confirmed
detections (y in {0, 1, 2}) by maximising the exact two-state marginal
likelihood with an analytic gradient (BFGS). The observed-information
covariance is the inverse of the negative finite-difference Jacobian of the
analytic gradient at the mode. All four arms (occupancy psi, true detection
p11, false-positive p10, certain-classification b) are site-level logit
predictors.
Usage
fp_occu_laplace(
y,
site_idx,
X_psi,
X_p11,
X_p10,
X_b,
sigma_beta = NULL,
max_iter = 200L,
tol = 1e-08,
verbose = FALSE
)Arguments
- y
Integer vector of detection states (
0/1/2), long form (valid visits only).- site_idx
Integer vector, same length as
y, 1-based site index.- X_psi, X_p11, X_p10, X_b
Numeric
[n_sites x p_arm]design matrices for the four arms.- sigma_beta
Optional Gaussian prior SD on the coefficients (a mild ridge for stability);
NULL(default) is the unpenalised MLE.- max_iter
BFGS iteration budget (default 200).
- tol
Convergence tolerance (
optimreltol, default 1e-8).- verbose
Print convergence status.