This function prepares a dataframe in which each row specifies a
simulation scenario. The dataframe is used as input to run.scenarios.
make.scenarios(trapsindex = 1, noccasions = 3, nrepeats = 1, D, g0, sigma, lambda0,
detectfn = 0, recapfactor = 1, popindex = 1, detindex = 1, fitindex = 1, groups,
crosstraps = TRUE)integer vector determining the traps object to use
integer vector for the number of sampling occasions
integer vector of multipliers for D (see Details)
numeric vector of values for the density parameter (animals / hectare)
numeric vector of values for the g0 parameter
numeric vector of values for the sigma parameter (m)
numeric vector of values for the lambda0 parameter
vector of valid detection function codes (numeric or character)
numeric vector of values for recapfactor
(sim.capthist)
integer vector determining which population model is used
integer vector determining which detection options are used
integer vector determining which model is fitted
character vector of group labels (optional)
logical; if TRUE the output includes all
combinations of
trapsindex, noccasions and nrepeats
Dataframe with one row per scenario (or sub-scenario) and the columns
a number identifying the scenario
(optional)
or lambda0
see detectfn; always numeric
The index in trapsindex is used in run.scenarios to
select particular detector arrays from the list of arrays provided as
an argument to that function.
The function generates all combinations of the given parameter values
using expand.grid. By default, it also generates
all combinations of the parameters with trapsindex and the
number of sampling occasions. If crosstraps is FALSE then
trapsindex, noccasions, and nrepeats are merely
used to fill in these columns in the output dataframe.
The argument lambda0 replaces g0 for the hazard detection
functions 14--18 (detectfn).
Designs may use multiple detector arrays with the same internal
geometry (e.g., number and spacing of traps). The number of such
arrays is varied with the nrepeats argument. For example, you
may compare designs with many small arrays or a few large ones. In
practice, run.scenarios simulates a single layout is simulated
with density D * nrepeats. This shortcut is not appropriate when
animals compete for traps (detector = `single').
fitindex allows a choice of different models when the argument
fit.args of run.scenarios is a compound list.
If groups is provided each scenario is replicated to the length of groups and a column `group' is added.
# NOT RUN {
make.scenarios(trapsindex = 1, nrepeats = 1, D = c(5,10), sigma = 25,
g0 = 0.2)
# }
Run the code above in your browser using DataLab