Description Usage Arguments Details Value Author(s) References See Also Examples
This function fits spatiallyexplicit population abundance models for capturemarkrecapture data consisting of multiple noninvasive marks using Bayesian analysis methods. Markov chain Monte Carlo (MCMC) is used to draw samples from the joint posterior distribution.
1 2 3 4 5 6 7 8 9 10 11  multimarkClosedSCR(Enc.Mat, trapCoords, studyArea = NULL,
buffer = NULL, ncells = 1024, data.type = "never",
covs = data.frame(), mms = NULL, mod.p = ~1, mod.delta = ~type,
detection = "halfnormal", parms = c("pbeta", "delta", "N"),
nchains = 1, iter = 12000, adapt = 1000, bin = 50, thin = 1,
burnin = 2000, taccept = 0.44, tuneadjust = 0.95,
proppbeta = 0.1, propsigma = 1, propcenter = NULL,
maxnumbasis = 1, a0delta = 1, a0alpha = 1, b0alpha = 1,
sigma_bounds = NULL, mu0 = 0, sigma2_mu0 = 1.75, a0psi = 1,
b0psi = 1, initial.values = NULL, known = integer(),
scalemax = 10, printlog = FALSE, ...)

Enc.Mat 
A matrix containing the observed encounter histories with rows corresponding to individuals and ( 
trapCoords 
A matrix of dimension 
studyArea 
is a 3column matrix containing the coordinates for the centroids of a contiguous grid of cells that define the study area and available habitat. Each row corresponds to a grid cell. The first 2 columns (“x” and “y”) indicate the Cartesian x and ycoordinate for the centroid of each grid cell, and the third column (“avail”) indicates whether the cell is available habitat (=1) or not (=0). All cells must be square and have the same resolution. If 
buffer 
A scaler in same units as 
ncells 
The number of grid cells in the study area when 
data.type 
Specifies the encounter history data type. All data types include nondetections (type 0 encounter), type 1 encounter (e.g., leftside), and type 2 encounters (e.g., rightside). When both type 1 and type 2 encounters occur for the same individual within a sampling occasion, these can either be "nonsimultaneous" (type 3 encounter) or "simultaneous" (type 4 encounter). Three data types are currently permitted:

covs 
A data frame of time and/or trapdependent covariates for detection probabilities (ignored unless 
mms 
An optional object of class 
mod.p 
Model formula for detection probability as a function of distance from activity centers. For example, 
mod.delta 
Model formula for conditional probabilities of type 1 (delta_1) and type 2 (delta_2) encounters, given detection. Currently only 
detection 
Model for detection probability as a function of distance from activity centers . Must be " 
parms 
A character vector giving the names of the parameters and latent variables to monitor. Possible parameters are cloglogscale detection probability parameters (" 
nchains 
The number of parallel MCMC chains for the model. 
iter 
The number of MCMC iterations. 
adapt 
The number of iterations for proposal distribution adaptation. If 
bin 
Bin length for calculating acceptance rates during adaptive phase ( 
thin 
Thinning interval for monitored parameters. 
burnin 
Number of burnin iterations ( 
taccept 
Target acceptance rate during adaptive phase ( 
tuneadjust 
Adjustment term during adaptive phase ( 
proppbeta 
Scaler or vector (of length k) specifying the initial standard deviation of the Normal(pbeta[j], proppbeta[j]) proposal distribution. If 
propsigma 
Scaler specifying the initial Gamma(shape = 1/ 
propcenter 
Scaler specifying the neighborhood distance when proposing updates to activity centers. When 
maxnumbasis 
Maximum number of basis vectors to use when proposing latent history frequency updates. Default is 
a0delta 
Scaler or vector (of length d) specifying the prior for the conditional (on detection) probability of type 1 (delta_1), type 2 (delta_2), and both type 1 and type 2 encounters (1delta_1delta_2). If 
a0alpha 
Specifies "shape1" parameter for [alpha] ~ Beta(a0alpha, b0alpha) prior. Only applicable when 
b0alpha 
Specifies "shape2" parameter for [alpha] ~ Beta(a0alpha, b0alpha) prior. Only applicable when 
sigma_bounds 
Positive vector of length 2 for the lower and upper bounds for the [sigma_scr] ~ Uniform(sigma_bounds[1], sigma_bounds[2]) (or [sqrt(lambda)] when 
mu0 
Scaler or vector (of length k) specifying mean of pbeta[j] ~ Normal(mu0[j], sigma2_mu0[j]) prior. If 
sigma2_mu0 
Scaler or vector (of length k) specifying variance of pbeta[j] ~ Normal(mu0[j], sigma2_mu0[j]) prior. If 
a0psi 
Specifies "shape1" parameter for [psi] ~ Beta(a0psi,b0psi) prior. Default is 
b0psi 
Specifies "shape2" parameter for [psi] ~ Beta(a0psi,b0psi) prior. Default is 
initial.values 
Optional list of 
known 
Optional integer vector indicating whether the encounter history of an individual is known with certainty (i.e., the observed encounter history is the true encounter history). Encounter histories with at least one type 4 encounter are automatically assumed to be known, and 
scalemax 
Upper bound for internal rescaling of grid cell centroid coordinates. Default is 
printlog 
Logical indicating whether to print the progress of chains and any errors to a log file in the working directory. Ignored when 
... 
Additional " 
The first time multimarkSCRClosed
is called, it will likely produce a firewall warning alerting users that R has requested the ability to accept incoming network connections. Incoming network connections are required to use parallel processing as implemented in multimarkClosed
. Note that setting parms="all"
is required for any multimarkClosed
model output to be used in multimodelClosed
.
A list containing the following:
mcmc 
Markov chain Monte Carlo object of class 
mod.p 
Model formula for detection probability (as specified by 
mod.delta 
Model formula for conditional probability of type 1 or type 2 encounter, given detection (as specified by 
mod.det 
Model formula for detection function (as specified by 
DM 
A list of design matrices for detection probability generated for model 
initial.values 
A list containing the parameter and latent variable values at iteration 
mms 
An object of class 
Brett T. McClintock
Bonner, S. J., and Holmberg J. 2013. Markrecapture with multiple, noninvasive marks. Biometrics 69: 766775.
Gopalaswamy, A.M., Royle, J.A., Hines, J.E., Singh, P., Jathanna, D., Kumar, N. and Karanth, K.U. 2012. Program SPACECAP: software for estimating animal density using spatially explicit capturerecapture models. Methods in Ecology and Evolution 3:10671072.
King, R., McClintock, B. T., Kidney, D., and Borchers, D. L. 2016. Capturerecapture abundance estimation using a semicomplete data likelihood approach. The Annals of Applied Statistics 10: 264285
McClintock, B. T., Conn, P. B., Alonso, R. S., and Crooks, K. R. 2013. Integrated modeling of bilateral photoidentification data in markrecapture analyses. Ecology 94: 14641471.
McClintock, B. T., Bailey, L. L., Dreher, B. P., and Link, W. A. 2014. Probit models for capturerecapture data subject to imperfect detection, individual heterogeneity and misidentification. The Annals of Applied Statistics 8: 24612484.
Royle, J.A., Karanth, K.U., Gopalaswamy, A.M. and Kumar, N.S. 2009. Bayesian inference in camera trapping studies for a class of spatial capturerecapture models. Ecology 90: 32333244.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15  # This example is excluded from testing to reduce package check time
# Example uses unrealistically low values for nchain, iter, and burnin
#Generate object of class "multimarkSCRsetup" from simulated data
sim.data<simdataClosedSCR()
Enc.Mat < sim.data$Enc.Mat
trapCoords < sim.data$spatialInputs$trapCoords
studyArea < sim.data$spatialInputs$studyArea
#Run single chain using the default model for simulated data
example.dot<multimarkClosedSCR(Enc.Mat,trapCoords,studyArea)
#Posterior summary for monitored parameters
summary(example.dot$mcmc)
plot(example.dot$mcmc)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.