stan_pcount {ubms} | R Documentation |
Fit the N-mixture model of Royle (2004)
Description
This function fits the single season N-mixture model of Royle et al. (2004).
Usage
stan_pcount(
formula,
data,
K = NULL,
mixture = "P",
prior_intercept_state = normal(0, 5),
prior_coef_state = normal(0, 2.5),
prior_intercept_det = logistic(0, 1),
prior_coef_det = logistic(0, 1),
prior_sigma = gamma(1, 1),
log_lik = TRUE,
...
)
Arguments
formula |
Double right-hand side formula describing covariates of detection and abundance in that order |
data |
A |
K |
Integer upper index of integration for N-mixture. This should be set high enough so that it does not affect the parameter estimates. Note that computation time will increase with K. |
mixture |
Character specifying mixture: "P" is only option currently. |
prior_intercept_state |
Prior distribution for the intercept of the
state (abundance) model; see |
prior_coef_state |
Prior distribution for the regression coefficients of the state model |
prior_intercept_det |
Prior distribution for the intercept of the detection probability model |
prior_coef_det |
Prior distribution for the regression coefficients of the detection model |
prior_sigma |
Prior distribution on random effect standard deviations |
log_lik |
If |
... |
Arguments passed to the |
Value
ubmsFitPcount
object describing the model fit.
References
Royle JA. 2004. N-mixture models for estimating populaiton size from spatially replicated counts. Biometrics 60: 105-108.
See Also
Examples
data(mallard)
mallardUMF <- unmarkedFramePCount(mallard.y, siteCovs=mallard.site)
(fm_mallard <- stan_pcount(~1~elev+forest, mallardUMF, K=30,
chains=3, iter=300))