Manages the global mctable (Monte Carlo nodes reference table) by setting or retrieving its value. The table stores metadata about mcnodes including descriptions, functions, and sensitivity analysis parameters.
Value
Current or newly set mctable. Columns include: mcnode (required), description, mc_func, from_variable, sample_space, transformation, sensi_variation.
Details
mctable columns are interpreted as follows:
mcnode: Name of the Monte Carlo node (required).description: Human-readable description of the node.mc_func: Distribution function used to create stochastic nodes (for examplerunif,rpert). If missing/NA, node is deterministic.from_variable: Source column name indatawhen different frommcnode.sample_space: Sampling definition used bymctable_bounds()andmctable_sobol_matrices(). Supported formats includec(...)and named bounds such asmin = X, max = Y.transformation: R expression applied usingvalueas placeholder before node creation.sensi_variation: OAT variation expression usingvalueplaceholder ineval_module().
Examples
# Get current MC table
current_table <- set_mctable()
# Set new MC table
mct <- data.frame(
mcnode = c("h_prev", "w_prev"),
description = c("Herd prevalence", "Within herd prevalence"),
mc_func = c("runif", "runif")
)
set_mctable(mct)
#> mctable set to mct
