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 |
fit |
A fitted |
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 |
freq.dist |
A character string, either |
test.detfn |
Logical value, if |
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 |
cutoff |
The signal strength threshold, above which sounds are
identified as detections. Only required when |
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
|
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.
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.