sobol_indices {sensobol}R Documentation

Computation of first, second, third and total-order Sobol' indices

Description

It computes and bootstraps up to third-order Sobol' indices using either the Saltelli et al. (2010) or the Jansen (1999) estimator.

Usage

sobol_indices(
  Y,
  params,
  type = "jansen",
  R,
  n,
  parallel = "no",
  ncpus = 1,
  second = FALSE,
  third = FALSE
)

Arguments

Y

Numeric vector, model output.

params

Vector with the name of the model inputs.

type

Estimator to use: type = "saltelli" uses the Saltelli et al. (2010) estimator; type = "jansen" uses the Jansen (1999) estimator. Default is type = "jansen".

R

Integer, number of bootstrap replicas.

n

Integer, sample size of the sample matrix.

parallel

The type of parallel operation to be used (if any). If missing, the default is taken from the option "boot.parallel" (and if that is not set, "no"). For more information, check the parallel option in the boot function of the boot package.

ncpus

Integer: number of processes to be used in parallel operation: typically one would chose this to the number of available CPUs. Check the ncpus option in the boot function of the boot package.

second

Logical. if second = TRUE, it computes second-order Sobol' indices.

third

Logical. if third = TRUE, it computes third-order Sobol' indices.

Value

A data.table object. It includes a column with the results of the bootstrap.

References

Jansen M (1999). “Analysis of variance designs for model output.” Computer Physics Communications, 117(1), 35–43. ISSN 00104655, doi: 10.1016/S0010-4655(98)00154-4.

Saltelli A, Annoni P, Azzini I, Campolongo F, Ratto M, Tarantola S (2010). “Variance based sensitivity analysis of model output. Design and estimator for the total sensitivity index.” Computer Physics Communications, 181(2), 259–270. ISSN 00104655, doi: 10.1016/j.cpc.2009.09.018.

See Also

Check the function boot for further details on the bootstrapping and the components available within the class boot.

Examples

# Define settings:
n <- 1000; k <- 8; R <- 100
# Design the sample matrix:
A <- sobol_matrices(n = n, k = k, second = TRUE, third = TRUE)
# Compute the model output:
Y <- sobol_Fun(A)
# Compute the Sobol' indices:
sens <- sobol_indices(Y = Y, params = colnames(data.frame(A)),
R = R, n = n, parallel = "no", ncpus = 1, second = TRUE, third = TRUE)

[Package sensobol version 0.2.2 Index]