sobol_convergence {sensobol} | R Documentation |
Check convergence of Sobol' indices.
Description
It checks the convergence of Sobol' indices on different sub-samples of the model output-.
Usage
sobol_convergence(
matrices,
Y,
N,
sub.sample,
params,
first,
total,
order = order,
seed = 666,
plot.order,
...
)
Arguments
matrices |
Character vector with the required matrices. The default is |
Y |
Numeric vector with the model output obtained from the matrix created with
|
N |
Positive integer, the initial sample size of the base sample matrix created with |
sub.sample |
Numeric vector with the sub-samples of the model output at which to check convergence. |
params |
Character vector with the name of the model inputs. |
first |
Estimator to compute first-order indices. Check options in |
total |
Estimator to compute total-order indices. Check options in |
order |
Whether to plot convergence for "second" or "third" order indices. |
seed |
Whether to compute "first", "second", or "third" -order Sobol' indices. Default
is |
plot.order |
Whether to plot convergence for "second" or "third"-order indices. |
... |
Further arguments in |
Value
A list with the results and the plots
Examples
# Define settings
matrices <- c("A", "B", "AB")
params <- paste("X", 1:3, sep = "")
N <- 2^10
first <- "saltelli"
total <- "jansen"
order <- "second"
# Create sample matrix
mat <- sobol_matrices(N = N, params = params, order = order)
# Compute Ishigami function
Y <- ishigami_Fun(mat)
# Check convergence at specific sample sizes
sub.sample <- seq(100, N, 500) # Define sub-samples
sobol_convergence(matrices = matrices, Y = Y, N = N, sub.sample = sub.sample,
params = params, first = first, total = total, order = order, plot.order = order)