Learn R Programming

Sobol4R (version 0.4.0)

sobol_design: Create Sobol Sampling Designs

Description

Generate the two-sample matrices (A and B) that are required to apply Monte Carlo Sobol estimators. The helper can rely on pseudo random numbers or on a light-weight Halton low-discrepancy sequence to increase coverage.

Usage

sobol_design(
  n,
  d,
  lower = rep(0, d),
  upper = rep(1, d),
  quasi = FALSE,
  seed = NULL
)

Value

A list with matrices A and B plus the column names.

Arguments

n

Integer, number of rows per design matrix.

d

Integer, number of model parameters.

lower

Numeric vector of length d containing lower bounds.

upper

Numeric vector of length d containing upper bounds.

quasi

Logical, when TRUE a Halton sequence is used.

seed

Optional integer used to initialise the RNG state.

Examples

Run this code
design <- sobol_design(n = 64, d = 3, quasi = TRUE)
str(design)

Run the code above in your browser using DataLab