Combines detection data, detector locations, and covariate data
into a single object. Performs spatial interpolation for spatial
covariates. The resulting object can be used to plot detection and
covariate data with plot.acre_data(), and to fit models with
fit.acre().
Arguments
- captures
A data frame with detection data. Further details are available below.
- traps
A matrix or a data frame with two columns, or a list of such matrices or data frames for a multi-session model. Each row provides the x- and y-coordinates of a detector location, in metres. For multi-session models, each component of the list provides detector locations for one session.
- mask
Optional. A mask object, for example created using
create.mask(). IfNULL, a mask object will be created automatically based on thetrapsandcontrol.maskarguments.- control.mask
A list specifying arguments for
create.mask(), other thantraps, that are used to create a mask object. Thebuffershould be provided, and, optionally, thespacing.- loc.cov
A data frame, or a list of data frames, containing spatial covariates. Data frames must contain columns
xandyfor x- and y-coordinates, in metres, and additional columns for spatial covariates measured at these locations. MissingNAvalues are allowed. Spatial interpolation is performed to produce covariate values at the mask point locations; see the section on spatial covariates below.- time.loc.cov
A list, or list of data frames, containing spatial covariates that change over time. The data frames must contain columns
x,yandtime, and additional columns for the spatiotemporal covariates. When these spatiotemporal covariates are provided, the columntimemust also appear insession.cov.- convert.loc2mask
A list to control the spatial interpolation method used to compute covariate values for mask locations based on data provided in
loc.covandtime.loc.cov. See the section on spatial covariates below.- session.cov
A data frame containing session covariates. It must contain a column
session, and additional columns for the session-level covariates. If spatiotemporal covariates are included usingtime.loc.cov, then a columntimemust be included, indicating when the session took place.- trap.cov
A data frame containing trap covariates. It must contain a column
trapand additional columns for the trap-level covariates. The columnsessionmust be included for multisession data.- dist.cov
A list containing locations of features from which distances are calculated, and can be used as spatial covariates. Each component must be named after a feature, with a data frame containing columns
xandy, recording the the location of a feature.- cue.rates
A numeric vector containing the recorded cue rates of individuals, collected separately to the SCR survey. See the section on cue rate data, below.
- survey.length
A numeric vector or a scalar, containing the length of each session. If it is a scalar and there are multiple sessions, the value will be assigned to all sessions.
- sound.speed
A scalar, the speed of sound in metres per second. This argument is only used when time-of-arrival data are included in the
capturesdata frame. Defaults to 330, the approximate speed of sound in air.
Captures argument
The captures argument must be a data frame, where each row corresponds to a single detection, usually of a call, by a single detector. The following columns are required:
session: a session identifier.ID: a call identifier.trap: a detector identifier.
Additional columns can specify auxiliary data collected about the
calls. Missing values of NA are allowed, so that an auxiliary
data type might only be available for a subet of calls.
bearing: the estimated bearing (in radians) from the detector to the detected call.dist: the estimated distance (in metres) from the detector to the detected call.ss: the received signal strength of the detected call.toa: the time of arrival of the detected call at the detector, measured in seconds since the start of the survey.animal_ID: an animal identifier, if animals can be recognised from their calls.
When bearings, distances, signal strengths, or times of arrival are
provided, they are automatically used by fit.acre() during model
fitting via the method described by Borchers et al (2015), which
can considerably improve precision of density estimates.
If animal_ID is provided, then calling animal density and call
production rates are separately estimated from the SCR data via the
method described by Stevenson et al (2021). Note that animals are
assumed to remain stationary throughout the survey.
Spatial covariates
When spatial covariates are used to model spatial variation in density, they must be available for every mask point location during model-fitting. However, the resolution of the spatial data available from its primary source is likely to differ from the resolution of the mask. Spatial interpolation is therefore required to generate covariate values at the mask points.
If required, read.acre() will automatically carry out this
spatial interpolation. The user simply needs to provide whatever
spatial data are available from its original source via the
arguments loc.cov, time.loc.cov, or both. Measurements do not
need to be available at points falling in a regular grid or
anything like that; covariates measured at a higgledy-piggledy
collection of coordinates are fine. Our spatial interpolation
method works by selecting the closest measurements available and
taking a weighted average, using a distance-based weighting
function so that closer measurements have greater influence.
Be warned that estimated density surfaces are only as good as the
interpolated covariate values. If the covariate data provided via
loc.cov and time.loc.cov have low spatial resolution, then the
interpolated covariates may not closely approximate reality,
leading to poor inference. Users should inspect plots of
interpolated covariates using plot() to assess their
suitability. See plot.acre_data().
If a user does not want to use our spatial interpolation method, they can take full control of the procedure using these steps:
Create a mask themselves using
create.mask().Carry out spatial interpolation themselves, generating covariate values at the mask points.
Provide the spatially interpolated data as the
loc.covandtime.loc.covarguments.
Cue rate data
If animal identifiers are not included in the captures argument,
then call density (calls produced per unit area per unit time)
rather than population density (individuals per unit area) is
estimated by fit.acre().
If cue rates are separately collected and provided via the
cue.rates argument, then population density can also be estimated
by fit.acre(). See Stevenson et al (2015) for further
details.
The cue.rates argument should be a vector, where each element is
the observed cue rate of an individual animal. The cue rates must
be provided in calls per unit time, where the time units are
equivalent to those used by survey.length. For example, if the
survey was 30 minutes long, the cue rates must be provided in cues
per minute if survey.length = 30, but in cues per hour if
survey.length = 0.5.
References
Borchers, D. L., Stevenson, B. C., Kidney, D., Thomas, L., and Marques, T. A. (2015) A unifying model for capture-recapture and distance sampling surveys of wildlife populations. Journal of the American Statistical Association, 110(509), 195–204.
Stevenson, B. C., Borchers, D. L., Altwegg, R., Swift, R. J., Gillespie, D. M., and Measey, G. J. (2015) A general framework for animal density estimation from acoustic detections across a fixed microphone array. Methods in Ecology and Evolution, 6(1), 38–48.
Stevenson, B. C., van Dam-Bates, P., Young, C. K. Y., and Measey, J. (2021) A spatial capture-recapture model to estimate call rate and population density from passive acoustic surveys. *Methods in Ecology and Evolution, 12(3), 432–442.
Examples
if (FALSE) { # \dontrun{
## Getting some data.
example <- get("simple_hhn")
## A simple modelthat
simple.hhn.fit <- read.acre(capt = example$capt, traps = example$traps, control.mask = list(buffer = 30))
## A simple model with a hazard-rate detection function.
example_hr <- get("simple_hr")
simple.hr.fit <- read.acre(capt = example_hr$capt, traps = example_hr$traps, control.mask = list(buffer = 30),
detfn = "hr")
} # }