Comparative point and interval estimates for the population size \(N\) obtained fitting many alternative behavioural and time effect capture-recapture models. Log marginal likelihood is reported for each alternative model.
BBRecap.all(data, last.column.count=FALSE, neval=1000, by.incr=1,nsim=10000,
burnin=round(nsim/10),nsim.ML=500,burnin.ML=round(nsim.ML/10), num.t = 50,
prior.N = c("Rissanen","Uniform","one.over.N","one.over.N2"),
which.mod=c("all","standard"), sort=c("default","log.ML"))
can be one of the following:
an \(M\) by \(t\) binary matrix/data.frame. In this case the input is interpreted as a matrix whose rows contain individual capture histories for all \(M\) observed units
a matrix/data.frame with \((t+1)\) columns. The first \(t\) columns contain binary entries corresponding to capture occurrences, while the last column contains non negative integers corresponding to frequencies. This format is allowed only when last.column.count
is set to TRUE
a \(t\)-dimensional array or table representing the counts of the \(2^t\) contingency table of binary outcomes
\(M\) is the number of units captured at least once and \(t\) is the number of capture occasions.
a logical. In the default case last.column.count=FALSE
each row of the input argument data
represents the complete capture history for each observed unit. When last.column.count
is set to TRUE
in each row the first \(t\) entries represent one of the observed complete capture histories and the last entry in the last column is the number of observed units with that capture history
a positive integer. neval
is the number of values of the population size \(N\) where the posterior is evaluated starting from \(M\). The default value is neval
=1000.
a positive integer. nsim
is the number of iterations for the Metropolis-within-Gibbs algorithm which allows the approximation of the posterior. It is considered only if mod
is "linear.logistic"
or "Msubjective"
. In the other cases closed form evaluation of the posterior is available up to a proportionality constant. The default value is nsim=10000.
a positive integer. nsim
is the number of iterations for the Metropolis-within-Gibbs algorithm which allows the approximation of the posterior. It is considered only if mod
is "linear.logistic"
or "Msubjective"
. In the other cases closed form evaluation of the posterior is available up to a proportionality constant. The default value is nsim=10000.
a positive integer. burnin
is the initial number of MCMC samples discarded. It is considered only if mod
is "linear.logistic"
or "Msubjective"
. The default value for burnin
is round(nsim/10).
a positive integer. Whenever MCMC is needed nsim.ML
is the number of iterations used in the marginal likelihood estimation procedure via power posterior method of Friel and Pettit (2008)
a positive integer. Whenever MCMC is needed burnin.ML
is the initial number of samples discarded for marginal likelihood estimation via power-posterior approach. The default value is burnin.ML
is round(nsim/10)
.
a positive integer. Whenever MCMC is needed num.t
is the number of powers used in the power posterior approximation method for the marginal likelihood evaluation.
a character. prior.N
is the label for the prior distribution for \(N\). When prior.N
is set to "Rissanen"
(default) the Rissanen prior is used as a prior on \(N\). This distribution was first proposed in Rissanen 1983 as a universal prior on integers. prior.N="Uniform"
stands for a prior on \(N\) proportional to a constant value. prior.N="one.over.N"
stands for a prior on \(N\) proportional to \(1/N\). prior.N="one.over.N2"
stands for a prior on \(N\) proportional to \(1/N^2\).
a character. which.mod
selects which models are fitted and compared. In the default setting which.mod
="all"
all alternative models are fitted including new behavioural models based on alternative meaningful covariates (see Details). When which.mod
="standard"
the function only fits classical behavioural models with either enduring effects as in \(M_b\), \(M_{c_1b}\), \(M_{c_2b}\) or ephemeral effects as in purely Markovian \(M_{c_1}\) and \(M_{c_2}\)
character. sort
selects the order of models.
A data.frame
with one row corresponding to each model and the following columns:
A dataframe with one row corresponding to each model and the following columns:
model: model considered
npar: number of parameters
log.marginal.likelihood: log marginal likelihood
Nhat: estimate of population size
Ninf: lower \(95 \%\) highest posterior density interval
Nsup: upper \(95 \%\) highest posterior density interval
The available models are: \(M_0\), \(M_b\), \(M_t\), \(M_{c_1}\), \(M_{c_1b}\), \(M_{c_2}\), \(M_{c_2b}\), \(M_{mc}\), \(M_{mc_{int}}\), \(M_{mc_{count}}\) and \(M_{mc_{count.int}}\).
This function BBRecap.all
can be computing intensive for high values of neval
and nsim
.
Otis D. L., Burnham K. P., White G. C, Anderson D. R. (1978) Statistical Inference From Capture Data on Closed Animal Populations, Wildlife Monographs.
Yang H.C., Chao A. (2005) Modeling animals behavioral response by Markov chain models for capture-recapture experiments, Biometrics 61(4), 1010-1017
N. Friel and A. N. Pettitt. Marginal likelihood estimation via power posteriors. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 70(3):589, 607--2008
Farcomeni A. (2011) Recapture models under equality constraints for the conditional capture probabilities. Biometrika 98(1):237--242
Alunni Fegatelli, D. and Tardella, L. (2012) Improved inference on capture recapture models with behavioural effects. Statistical Methods & Applications Applications Volume 22, Issue 1, pp 45-66 10.1007/s10260-012-0221-4
Alunni Fegatelli D. (2013) New methods for capture-recapture modelling with behavioural response and individual heterogeneity. http://hdl.handle.net/11573/918752
# NOT RUN {
# }
# NOT RUN {
data(hornedlizard)
BBRecap.all(hornedlizard,neval=200)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab