View source: R/multimark_functions.R
processdataSCR | R Documentation |
This function generates an object of class multimarkSCRsetup
that is required to fit spatial ‘multimark’ models.
processdataSCR(
Enc.Mat,
trapCoords,
studyArea = NULL,
buffer = NULL,
ncells = NULL,
data.type = "never",
covs = data.frame(),
known = integer(),
scalemax = 10
)
Enc.Mat |
A matrix containing the observed encounter histories with rows corresponding to individuals and ( |
trapCoords |
A matrix of dimension |
studyArea |
is a 3-column 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 indicate the Cartesian x- and y-coordinate for the centroid of each grid cell, and the third column 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 non-detections (type 0 encounter), type 1 encounter (e.g., left-side), and type 2 encounters (e.g., right-side). When both type 1 and type 2 encounters occur for the same individual within a sampling occasion, these can either be "non-simultaneous" (type 3 encounter) or "simultaneous" (type 4 encounter). Three data types are currently permitted:
|
covs |
A data frame of time- and/or trap-dependent covariates for detection probabilities (ignored unless |
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 re-scaling of grid cell centroid coordinates. Default is |
An object of class multimarkSCRsetup
.
Brett T. McClintock
Bonner, S. J., and Holmberg J. 2013. Mark-recapture with multiple, non-invasive marks. Biometrics 69: 766-775.
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 capture-recapture models. Methods in Ecology and Evolution 3:1067-1072.
McClintock, B. T., Conn, P. B., Alonso, R. S., and Crooks, K. R. 2013. Integrated modeling of bilateral photo-identification data in mark-recapture analyses. Ecology 94: 1464-1471.
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 capture-recapture models. Ecology 90: 3233-3244.
multimarkSCRsetup-class
, multimarkClosedSCR
# 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 "multimarksetup" from simulated data
sim.data<-simdataClosedSCR()
Enc.Mat <- sim.data$Enc.Mat
trapCoords <- sim.data$spatialInputs$trapCoords
studyArea <- sim.data$spatialInputs$studyArea
setup <- processdataSCR(Enc.Mat,trapCoords,studyArea)
#Run single chain using the default model for simulated data
example.dot<-multimarkClosedSCR(mms=setup)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.