Skip to contents

This function extends the classical Sobol indices to a stochastic simulator by first computing a quantity of interest (QoI) for each input point, such as the mean of repeated runs.

Usage

sobol4r_qoi_indices(
  model,
  X1,
  X2,
  qoi_fun = base::mean,
  nrep = 1000,
  order = 2,
  nboot = 0,
  type = c("soboljansen", "sobol", "sobol2007", "sobolEff", "sobolmartinez"),
  ...
)

Arguments

model

Stochastic model function that takes a matrix or data.frame X and returns a numeric vector of length nrow(X).

X1, X2

Two base designs (matrices or data.frames).

qoi_fun

Function used to summarize the repetitions (default is mean).

nrep

Number of repetitions of the stochastic model for each design point.

order

Maximum interaction order (1 or 2).

nboot

Number of bootstrap replicates for Sobol indices.

type

Which estimator to use. Any sensitivity Sobol helper is supported: "sobol", "sobol2007", "soboljansen", "sobolEff", or "sobolmartinez". Defaults to "soboljansen", the most robust general-purpose choice.

...

Additional arguments passed to model.

Value

An object of class "sobol" with QoI-based Sobol indices.