Last chance! 50% off unlimited learning
Sale ends in
It checks the convergence of Sobol' indices on different sub-samples of the model output-.
sobol_convergence(
matrices,
Y,
N,
sub.sample,
params,
first,
total,
order = order,
seed = 666,
plot.order,
...
)
A list with the results and the plots
Character vector with the required matrices. The default is matrices = c("A", "B", "AB")
.
See sobol_matrices
.
Numeric vector with the model output obtained from the matrix created with
sobol_matrices
.
Positive integer, the initial sample size of the base sample matrix created with sobol_matrices
.
Numeric vector with the sub-samples of the model output at which to check convergence.
Character vector with the name of the model inputs.
Estimator to compute first-order indices. Check options in sobol_indices
.
Estimator to compute total-order indices. Check options in sobol_indices
.
Whether to plot convergence for "second" or "third" order indices.
Whether to compute "first", "second", or "third" -order Sobol' indices. Default
is order = "first"
.
Whether to plot convergence for "second" or "third"-order indices.
Further arguments in sobol_indices
.
# 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)
Run the code above in your browser using DataLab