Learn R Programming

sensitivity (version 1.10.1)

sobol: Monte Carlo Estimation of Sobol' Indices

Description

sobol implements the Monte Carlo estimation of the Sobol' sensitivity indices (standard estimator). This method allows the estimation of the indices of the variance decomposition, sometimes referred to as functional ANOVA decomposition, up to a given order, at a total cost of $(N+1) \times n$ where $N$ is the number of indices to estimate. This function allows also the estimation of the so-called subset (or group) indices, i.e. the first-order indices with respect to single multidimensional inputs.

Usage

sobol(model = NULL, X1, X2, order = 1, nboot = 0, conf = 0.95, ...)
## S3 method for class 'sobol':
tell(x, y = NULL, return.var = NULL, \dots)
## S3 method for class 'sobol':
print(x, \dots)
## S3 method for class 'sobol':
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
either an integer, the maximum order in the ANOVA decomposition (all indices up to this order will be computed), or a list of numeric vectors, the multidimensional compounds of the wanted subset indices.
nboot
the number of bootstrap replicates.
conf
the confidence level for bootstrap confidence intervals.
x
a list of class "sobol" storing the state of the sensitivity study (parameters, data, estimates).
y
a vector of model responses.
return.var
a vector of character strings giving further internal variables names to store in the output object x.
ylim
y-coordinate plotting limits.
...
any other arguments for model which are passed unchanged each time it is called.

Value

  • sobol returns a list of class "sobol", 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.
  • Vthe estimations of Variances of the Conditional Expectations (VCE) with respect to one factor or one group of factors.
  • Dthe estimations of the terms of the ANOVA decomposition (not for subset indices).
  • Sthe estimations of the Sobol' sensitivity indices (not for subset indices).
  • Users can ask more ouput variables with the argument return.var (for example, bootstrap outputs V.boot, D.boot and S.boot).

References

I. M. Sobol, 1993, Sensitivity analysis for non-linear mathematical model, Math. Modelling Comput. Exp., 1, 407--414.

See Also

sobol2002, sobol2007, soboljansen, sobolEff, sobolmara, sobolroalhs, fast99, sobolGP

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])
library(boot)
n <- 1000
X1 <- data.frame(matrix(runif(8 * n), nrow = n))
X2 <- data.frame(matrix(runif(8 * n), nrow = n))

# sensitivity analysis
x <- sobol(model = sobol.fun, X1 = X1, X2 = X2, order = 2, nboot = 100)
print(x)
#plot(x)

Run the code above in your browser using DataLab