sobol_matrices {sensobol} | R Documentation |
It creates the sample matrices to compute Sobol' first and total-order indices. If needed, it also creates the sample matrices required to compute second and third-order indices. It uses Sobol' quasi-random number sequences.
sobol_matrices(n, k, second = FALSE, third = FALSE, cluster = NULL)
n |
Integer, sample size of the Sobol' matrix. |
k |
Integer, number of model inputs. |
second |
Logical. If |
third |
Logical. If |
cluster |
List of vectors, each vector including the column number
of the parameters forming the cluster. The default is |
If cluster = NULL
, the function generates an (n, 2k) matrix using Sobol' quasi-random
number sequences. The first k-matrix is the A matrix and the
remaining k-matrix, the B matrix. It then generates k
additional matrices (A^j_B), j=1,2,...,k, where
the k matrix is composed of all columns of the A matrix
except the j-th column, which is the j column of the
B matrix. This approach leds to a total number of model runs of
n(k + 2) for first and total-order indices (Saltelli et al. 2010).
If a list of vectors is assigned to cluster
, the output is a scrambled matrix
with all columns from matrix A except those of the parameters included in the cluster, which
come from matrix B.
A matrix.
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 sobol
in the package randtoolbox
to see how the Sobol' quasi-random number sequences are constructed.
sobol_matrices(n = 100, k = 8, second = TRUE, third = TRUE)