Skip to contents

Extract the bounds required by sensitivity::morris() 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
)

Arguments

mctable

(data frame). Table containing at least mcnode and sample_space; may also contain transformation. Default: set_mctable().

mc_names

(character vector, optional). Node names to include. If NULL, all nodes in mctable$mcnode are used.

if_not_sampled

(character). How to handle nodes not listed in mc_names (and nodes with missing or empty sample_space): "exclude", "median", "mean", "max", or "min". Default: "exclude".

transformation

(logical). Whether to apply transformation rules. Default: TRUE.

n_probe

(integer). Number of probe draws used to approximate bounds when transformation = TRUE. Default: 1000.

Value

A list bounds with:

  • binf numeric vector of lower bounds (same order as factors).

  • bsup numeric vector of upper bounds (same order as factors).

  • factors character vector of factor names.

  • fixed named numeric vector with fixed values for non-sampled factors when if_not_sampled != "exclude".

Details

Supports sampling only a subset of nodes via mc_names and controls how non-sampled nodes are handled via if_not_sampled. If transformation is enabled and mctable includes a transformation column, the function computes bounds on the transformed values.