discrepancy_ersatz {sensobol}R Documentation

Computation of the S-ersatz discrepancy.

Description

It allows to use the S-ersatz discrepancy measure by Puy et al. (2024) as a sensitivity measure.

Usage

discrepancy_ersatz(mat, Y, params)

Arguments

mat

A numeric matrix created with sobol_matrices and matrices = "A", where each column represents an uncertain model input and each row a model simulation.

Y

A numeric vector with the model output obtained from the matrix created with sobol_matrices. The numeric vector should not contain any NA or NaN values.

params

A character vector with the name of the model inputs.

Details

It is recommended to define mat using a power of 2 as a sample size.

Value

A data.table object.

References

Puy A, Roy PT, Saltelli A (2024). “Discrepancy measures for global sensitivity analysis.” Technometrics. doi:10.1080/00401706.2024.2304341.

Examples

# Define settings
N <- 2^9; params <- paste("X", 1:8, sep = "")

# Create sample matrix
mat <- sobol_matrices(N = N, params = params, matrices = "A")

# Compute the Sobol' G function
Y <- sobol_Fun(mat)

# Compute the S-ersatz discrepancy values
ind <- discrepancy_ersatz(mat = mat, Y = Y, params = params)

[Package sensobol version 1.1.5 Index]