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 matrices = c("A", "B", "AB"). See sobol_matrices.

Y

Numeric vector with the model output obtained from the matrix created with sobol_matrices.

N

Positive integer, the initial sample size of the base sample matrix created with sobol_matrices.

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 sobol_indices.

total

Estimator to compute total-order indices. Check options in sobol_indices.

order

Whether to plot convergence for "second" or "third" order indices.

seed

Whether to compute "first", "second", or "third" -order Sobol' indices. Default is order = "first".

plot.order

Whether to plot convergence for "second" or "third"-order indices.

...

Further arguments in sobol_indices.

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)

[Package sensobol version 1.1.5 Index]