sim.capt: Simulating SECR data

Description Usage Arguments Details Value Examples

Description

Simulates SECR capture histories and associated additional information in the correct format for use with the function admbsecr. If fit is provided then no other arguments are required. Otherwise, at least traps, mask, and pars are needed.

Usage

1
2
3
4
sim.capt(fit = NULL, traps = NULL, mask = NULL,
  infotypes = character(0), detfn = "hn", pars = NULL,
  ss.link = "identity", cutoff = NULL, call.freqs = NULL,
  freq.dist = "edf", sound.speed = 330, test.detfn = FALSE)

Arguments

fit

A fitted admbsecr model object which provides the additional information types, detection function, and parameter values from which to generate capture histories.

infotypes

A character vector indicating the type(s) of additional information to be simulated. Elements can be a subset of "bearing", "dist", "toa", and "mrds" (NOTE: "mrds" not yet implemented). If signal strength information is required, specify detfn as "ss" rather than including it here.

detfn

A character string specifying the detection function to be used. Options are "hn" (halfnormal), "hr" (hazard rate), "th" (threshold), "lth" (log-link threshold), or "ss" (signal strength).

pars

A named list. Component names are parameter names, and each component is the value of the associated parameter. A value for the parameter D, animal density (or call density, if it an acoustic survey) must always be provided, along with values for parameters associated with the chosen detection function and additional information type(s).

freq.dist

A character string, either "edf" or "norm", which specifies how the distribution function of the call frequencies should be estimated. If "edf", then the distribution of call frequencies is estimated using the empirical distribution function. If "norm", then a normal distribution is fitted to the call frequencies using the sample mean and variance. See 'Details' below for information on how call frequencies are rounded.

test.detfn

Logical value, if TRUE, tests detection function to aid debugging.

traps

A matrix with two columns. Each row provides Cartesian coordinates for the location of a trap (or detector).

mask

A matrix with two columns. Each row provides Cartesian coordinates for the location of a mask point. The function create.mask will return a suitable object.

ss.link

A character string, either "identity" or "log", which specifies the link function for the signal strength detection function. Only required when detfn is "ss" (i.e., when there is signal strength information in capt).

cutoff

The signal strength threshold, above which sounds are identified as detections. Only required when detfn is "ss".

call.freqs

A vector of call frequencies collected independently to an acoustic survey.

sound.speed

The speed of sound in metres per second, defaults to 330 (the speed of sound in air). Only used when "toa" is a component name of capt.

Details

See documentation for the function admbsecr for information on the parameters corresponding to the different detection functions, and to different types of additional information.

Simulated call frequencies are not always integers, e.g. when freq.dist is "norm", or when freq.dist is "edf" and the call frequencies used to fit the model fit are not all integers. In this case, if freq.dist is "edf", then simulated call frequencies are rounded at random as follows: Let x be the fraction part of the number, then the call frequency is rounded up with probability x and rounded down with probability 1 - x. For example, a value of 8.1 will be rounded to 9 with probability 0.1, and rounded to 8 with probability 0.9.

Value

A list with named components, each corresponding to a data type listed in infotypes. Each component is a matrix where each row corresponds to each detected individual, and each column corresponds to a trap (or detector). The elements in the matrix indicate detection, and provide simulated values of the additional information requested. This object can be used as the capt argument for the function admbsecr.

Examples

1
2
3
4
5
6
## Simulating based on model fits.
simple.capt <- sim.capt(example$fits$simple.hn)
bearing.capt <- sim.capt(example$fits$bearing.hn)
## Simulating from provided parameter values.
new.capt <- sim.capt(traps = example$traps, mask = example$mask, infotypes = c("bearing", "dist"), detfn = "hr",
                     pars = list(D = 2500, g0 = 0.9, sigma = 3, z = 2, kappa = 50, alpha = 10))

admbsecr documentation built on May 2, 2019, 5:21 p.m.