Comparative Bayesian analysis of alternative flexible behavioural and time effect models
Description
Comparative point and interval estimates for the population size N obtained fitting many alternative behavioural and time effect capturerecapture models.
Log marginal likelihood is reported for each alternative model.
Usage
 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"))

Arguments
data 
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 tdimensional 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.

last.column.count 
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

neval 
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.

by.incr 
a positive integer. by.incr represents the increment on the sequence of possible population sizes N where the posterior is evaluated. The default value is by.incr =1. The use of by.incr >1 is discouraged unless the range of N values of interest is very large

nsim 
a positive integer. nsim is the number of iterations for the MetropoliswithinGibbs 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.

burnin 
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).

nsim.ML 
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)

burnin.ML 
a positive integer. Whenever MCMC is needed burnin.ML is the initial number of samples discarded for marginal likelihood estimation via powerposterior approach. The default value is burnin.ML is round(nsim/10) .

num.t 
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.

prior.N 
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.

which.mod 
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}

sort 
character. sort selects the order of models.

Details
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
.
Value
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
Author(s)
Danilo Alunni Fegatelli and Luca Tardella
References
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 capturerecapture experiments, Biometrics 61(4), 10101017
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 4566 10.1007/s1026001202214
Alunni Fegatelli D. (2013) New methods for capturerecapture modelling with behavioural response and individual heterogeneity.
See Also
BBRecap
,
Examples