sobol_indices {sensobol} | R Documentation |
It computes and bootstraps up to third-order Sobol' indices using either the Saltelli et al. (2010) or the Jansen (1999) estimator.
sobol_indices( Y, params, type = "jansen", R, n, parallel = "no", ncpus = 1, second = FALSE, third = FALSE )
Y |
Numeric vector, model output. |
params |
Vector with the name of the model inputs. |
type |
Estimator to use: |
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
|
ncpus |
Integer: number of processes to be used in parallel operation:
typically one would chose this to the number of available CPUs.
Check the |
second |
Logical. if |
third |
Logical. if |
A data.table object. It includes a column with the results of the bootstrap.
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.
Check the function boot
for further details on the bootstrapping
and the components available within the class boot
.
# 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)