Description Usage Arguments Details Value Examples
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.
1 2 3 4 5 |
fit |
A fitted |
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, providing x- and y-coordinates respectively. The extreme x- and y-coordinates define the rectangle in which individuals' locations are simulated. |
infotypes |
A character vector indicating the type(s) of
additional information to be simulated. Elements can be a
subset of |
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 |
ss.opts |
Options for models using the signal strength detection function. See 'Details' below. |
cue.rates |
A vector of call frequencies from which a
distribution for the number of emitted calls for each
individual is fitted. If scalar, all individuals make the same
number of calls. If |
survey.length |
The length of a cue-based survey. |
freq.dist |
A character string, either |
sound.speed |
The speed of sound in metres per second,
defaults to 330 (the speed of sound in air). Only used when
|
test.detfn |
Logical value, if |
first.only |
Only keep the first detection for each individual. |
keep.locs |
Logical, if |
keep.ids |
Logical, if |
... |
Other arguments (mostly for back-compatibility). |
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.
If cue.rates
is Inf
then all simulated individuals
will be detected. To generate sensible capture histories then both
a lower and upper cutoff must be supplied in ss.opts
. In
this case, individuals continue to emit calls until one is detected
above the lower cutoff by at least one microphone. This individual
is then incorporated into the resulting capture history only if the
loudest received signal strength is also above the upper cutoff.
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.
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))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.