This function prepares a dataframe in which each row specifies a
simulation scenario. The dataframe is used as input to run.scenarios
.
1 2 3  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)

trapsindex 
integer vector determining the traps object to use 
noccasions 
integer vector for the number of sampling occasions 
nrepeats 
integer vector of multipliers for D (see Details) 
D 
numeric vector of values for the density parameter (animals / hectare) 
g0 
numeric vector of values for the g0 parameter 
sigma 
numeric vector of values for the sigma parameter (m) 
lambda0 
numeric vector of values for the lambda0 parameter 
detectfn 
vector of valid detection function codes (numeric or character) 
recapfactor 
numeric vector of values for recapfactor
( 
popindex 
integer vector determining which population model is used 
detindex 
integer vector determining which detection options are used 
fitindex 
integer vector determining which model is fitted 
groups 
character vector of group labels (optional) 
crosstraps 
logical; if TRUE the output includes all
combinations of

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.
Dataframe with one row per scenario (or subscenario) and the columns
scenario 
a number identifying the scenario 
group 
(optional) 
trapsindex 

noccasions 

nrepeats 

D 

g0 
or lambda0 
sigma 

detectfn 
see 
recapfactor 

popindex 

detindex 

fitindex 
An attribute ‘inputs’ is saved for possible use in make.array
.
run.scenarios
, sim.capthist
1 2  make.scenarios(trapsindex = 1, nrepeats = 1, D = c(5,10), sigma = 25,
g0 = 0.2)

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
All documentation is copyright its authors; we didn't write any of that.