Learn R Programming

sensitivity (version 1.12.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). This method allows the estimation of all first-order p indices at a cost of N*(p+1) model calls, where p is the number of inputs and N is the random sample size, or the estimation of all closed second order indices at a cost of N*(p*(p-1)/2+1) model calls.

Usage

sobolEff(model = NULL, X1, X2, order=1, nboot = 0, conf = 0.95, ...)
## S3 method for class 'sobolEff':
tell(x, y = NULL, \dots)
## S3 method for class 'sobolEff':
print(x, \dots)
## S3 method for class 'sobolEff':
plot(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 order of the indices (1 or 2).
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:
  • callthe matched call.
  • Xa data.frame containing the design of experiments.
  • ya vector of model responses.
  • Sthe 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. Janon, A., Klein T., Lagnoux A., Nodet M., Prieur C. (2012), Asymptotic normality and efficiency of two Sobol index estimators. Accepted in ESAIM: Probability and Statistics.

See Also

sobol, sobol2002, sobol2007, soboljansen, sobolmartinez

Examples

Run this code
# 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)

Run the code above in your browser using DataLab