Create Sobol sampling matrices using sensobol::sobol_matrices() and an
mctable definition. The function generates quasi-random draws in [0, 1]
and then maps them to the target distributions defined in mctable$mc_func
(or mctable$func) and mctable$sample_space.
Usage
mctable_sobol_matrices(
mctable = set_mctable(),
N,
matrices = c("A", "B", "AB"),
order = c("first", "second", "third", "fourth"),
type = c("QRN", "LHS", "R"),
mc_names = NULL,
...
)Arguments
- mctable
(data frame). Table containing at least
mcnodeandsample_space; may also containmc_func/func.- N
(integer). Base sample size (see
sensobol::sobol_matrices()).- matrices
(character). Which Sobol matrices to create (see
sensobol::sobol_matrices()). Default:c("A", "B", "AB").- order
(character). Either
"first","second","third", or"fourth"(seesensobol::sobol_matrices()).- type
(character). Sampling design used by
sensobol::sobol_matrices(). In sensobol 1.1.6, options include"QRN"(default),"LHS", and"R".- mc_names
(character vector, optional). Node names to include. If
NULL, all nodes inmctable$mcnodeare used.- ...
Additional arguments passed to
sensobol::sobol_matrices()(and potentially torandtoolbox::sobol()whentype = "QRN").
Value
A numeric matrix where each column is a model input distributed in
(0, 1) after mapping to the distributions defined in the mctable,
and each row is a sampling point. The matrix has the same layout/row
binding as sensobol::sobol_matrices().
Details
If the distribution function is missing but numeric bounds are available in
sample_space (e.g. min = 0, max = 1 or c(0, 1)), the function assumes a
uniform distribution (stats::runif).
