sobol_dummy {sensobol} | R Documentation |
Computation of Sobol' indices for a dummy parameter
Description
This function computes first and total-order Sobol' indices for a dummy parameter following the formulae shown in Khorashadi Zadeh et al. (2017).
Usage
sobol_dummy(
Y,
N,
params,
boot = FALSE,
R = NULL,
parallel = "no",
ncpus = 1,
conf = 0.95,
type = "norm"
)
Arguments
Y |
A 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 |
params |
A character vector with the name of the model inputs. |
boot |
Logical. If TRUE, the function bootstraps the Sobol' indices. If FALSE, it provides point
estimates. Default is |
R |
Positive integer, number of bootstrap replicas. |
parallel |
The type of parallel operation to be used (if any).
If missing, the default is taken from the option "boot.parallel"
(and if that is not set, "no"). For more information, check the
|
ncpus |
Positive integer: number of processes to be used in parallel operation:
typically one would chose this to the number of available CPUs.
Check the |
conf |
Confidence intervals, number between 0 and 1. Default is |
type |
Method to compute the confidence intervals. Default is |
Value
A data.table
object.
References
Khorashadi Zadeh F, Nossent J, Sarrazin F, Pianosi F, van Griensven A, Wagener T, Bauwens W (2017). “Comparison of variance-based and moment-independent global sensitivity analysis approaches by application to the SWAT model.” Environmental Modelling and Software, 91, 210–222. doi:10.1016/j.envsoft.2017.02.001.
Examples
# Define settings
N <- 100; params <- paste("X", 1:3, sep = ""); R <- 10
# Create sample matrix
mat <- sobol_matrices(N = N, params = params)
# Compute Ishigami function
Y <- ishigami_Fun(mat)
# Compute and bootstrap Sobol' indices for dummy parameter
ind.dummy <- sobol_dummy(Y = Y, N = N, params = params, boot = TRUE, R = R)