Learn R Programming

sensitivity (version 1.22.1)

sobolEff: Monte Carlo Estimation of Sobol' Indices (formulas of Janon-Monod)

Description

sobolEff implements the Monte Carlo estimation of the Sobol' sensitivity indices using the asymptotically efficient formulas in section 4.2.4.2 of Monod et al. (2006). Either all first-order indices or all total-effect indices are estimated at a cost of \(N \times (p+1)\) model calls or all closed second-order indices are estimated at a cost of \(N \times p \choose 2)\) model calls.

Usage

sobolEff(model = NULL, X1, X2, order=1, nboot = 0, conf = 0.95, …)
# S3 method for sobolEff
tell(x, y = NULL, …)
# S3 method for sobolEff
print(x, …)
# S3 method for sobolEff
plot(x, ylim = c(0, 1), …)
# S3 method for sobolEff
ggplot(x, ylim = c(0, 1), …)

Arguments

model

a function, or a model with a predict method, defining the model to analyze.

X1

the first random sample.

X2

the second random sample.

order

an integer specifying the indices to estimate: 0 for total effect indices,1 for first-order indices and 2 for closed second-order indices.

nboot

the number of bootstrap replicates, or zero to use asymptotic standard deviation estimates given in Janon et al. (2012).

conf

the confidence level for confidence intervals.

x

a list of class "sobolEff" storing the state of the sensitivity study (parameters, data, estimates).

y

a vector of model responses.

ylim

y-coordinate plotting limits.

any other arguments for model which are passed unchanged each time it is called.

Value

sobolEff returns a list of class "sobolEff", containing all the input arguments detailed before, plus the following components:

call

the matched call.

X

a data.frame containing the design of experiments.

y

a vector of model responses.

S

the estimations of the Sobol' sensitivity indices.

Details

The estimator used by sobolEff is defined in Monod et al. (2006), Section 4.2.4.2 and studied under the name T_N in Janon et al. (2012). This estimator is good for large first-order indices.

References

Monod, H., Naud, C., Makowski, D. (2006), Uncertainty and sensitivity analysis for crop models in Working with Dynamic Crop Models: Evaluation, Analysis, Parameterization, and Applications, Elsevier.

A. Janon, T. Klein, A. Lagnoux, M. Nodet, C. Prieur (2014), Asymptotic normality and efficiency of two Sobol index estimators, ESAIM: Probability and Statistics, 18:342-364.

See Also

sobol, sobol2002, sobolSalt, sobol2007, soboljansen, sobolmartinez, sobolSmthSpl

Examples

Run this code
# NOT RUN {
# Test case : the non-monotonic Sobol g-function

# The method of sobol requires 2 samples
# (there are 8 factors, all following the uniform distribution on [0,1])
n <- 1000
X1 <- data.frame(matrix(runif(8 * n), nrow = n))
X2 <- data.frame(matrix(runif(8 * n), nrow = n))

# sensitivity analysis
x <- sobolEff(model = sobol.fun, X1 = X1, X2 = X2, nboot = 0)
print(x)

library(ggplot2)
ggplot(x)
# }

Run the code above in your browser using DataLab