Extract the bounds required by sensitivity::morris() and other sampling
design functions from an mctable.
Usage
mctable_bounds(
mctable = set_mctable(),
mc_names = NULL,
if_not_sampled = c("exclude", "median", "mean", "max", "min"),
transformation = TRUE,
n_probe = 1000,
drop_constant = TRUE
)Arguments
- mctable
(data frame). Table containing at least
mcnodeandsample_space; may also containtransformationandmc_func(used to probe transformations).sample_spacebounds can be given asmin = X, max = Yorc(X, Y); a single numeric value (e.g.1,c(1)orvalue = 1) is treated asmin = max. Default:set_mctable().- mc_names
(character vector, optional). Node names to include. If
NULL, all nodes inmctable$mcnodeare used.- if_not_sampled
(character). How to handle nodes not listed in
mc_names(and nodes with missing or emptysample_space):"exclude","median","mean","max", or"min". Default:"exclude".- transformation
(logical). Whether to apply
transformationrules. Default:TRUE.- n_probe
(integer). Number of grid points used to probe the transformed range when
transformation = TRUE. Probes are an evenly spaced grid of probabilities in [0, 1] mapped through the distribution defined bysample_spaceandmc_func(uniform,rnorm,rpertor categorical), so results are reproducible and do not affect the random number stream. Default: 1000.- drop_constant
(logical). If
TRUE, drop factors whose lower and upper bounds are equal (after any transformation). Dropped factors are listed indroppedand, whenif_not_sampled != "exclude", added tofixedwith their constant value. Dropped inputs are created as fixed nodes byeval_module()andtrial_totals()when missing fromsample_design. Default:TRUE.
Value
A list bounds with:
binfnumeric vector of lower bounds (same order asfactors).bsupnumeric vector of upper bounds (same order asfactors).factorscharacter vector of factor names.fixednamed numeric vector with fixed values for non-sampled factors whenif_not_sampled != "exclude".droppedcharacter vector of factors removed bydrop_constant.
