stan_occu | R Documentation |
This function fits the single season occupancy model of MacKenzie et al. (2002).
stan_occu(
formula,
data,
prior_intercept_state = logistic(0, 1),
prior_coef_state = logistic(0, 1),
prior_intercept_det = logistic(0, 1),
prior_coef_det = logistic(0, 1),
prior_sigma = gamma(1, 1),
log_lik = TRUE,
...
)
formula |
Double right-hand side formula describing covariates of detection and occupancy in that order |
data |
A |
prior_intercept_state |
Prior distribution for the intercept of the
state (occupancy probability) 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 |
ubmsFitOccu
object describing the model fit.
MacKenzie DI, Nichols JD, Lachman GB, Droege S, Royle JA, Langtimm CA. 2002. Estimating site occupancy rates when detection probabilities are less than one. Ecology 83: 2248-2255.
occu
, unmarkedFrameOccu
data(frogs)
pferUMF <- unmarkedFrameOccu(pfer.bin)
#Add some covariates
siteCovs(pferUMF) <- data.frame(cov1=rnorm(numSites(pferUMF)))
#Fit model
(fm <- stan_occu(~1~cov1, pferUMF, chains=3, iter=300))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.