Learn R Programming

sensitivity (version 1.10.1)

soboljansen: Monte Carlo Estimation of Sobol' Indices (improved formulas of Jansen (1999) and Saltelli et al. (2010))

Description

soboljansen implements the Monte Carlo estimation of the Sobol' indices for both first-order and total indices at the same time (alltogether $2p$ indices), at a total cost of $(p+2) \times n$ model evaluations. These are called the Jansen estimators.

Usage

soboljansen(model = NULL, X1, X2, nboot = 0, conf = 0.95, ...)
## S3 method for class 'soboljansen':
tell(x, y = NULL, return.var = NULL, \dots)
## S3 method for class 'soboljansen':
print(x, \dots)
## S3 method for class 'soboljansen':
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.
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

  • soboljansen returns a list of class "soboljansen", containing all the input arguments detailed before, plus the following components:
  • callthe matched call.
  • Xa data.frame containing the design of experiments.
  • ythe response used
  • Vthe estimations of Variances of the Conditional Expectations (VCE) with respect to each factor and also with respect to the complementary set of each factor ("all but $X_i$").
  • Sthe estimations of the Sobol' first-order indices.
  • Tthe estimations of the Sobol' total sensitivity indices.
  • Users can ask more ouput variables with the argument return.var (for example, bootstrap outputs V.boot, S.boot and T.boot).

Details

This estimator is good for large first-order indices, and (large and small) total indices.

References

M.J.W. Jansen, 1999, Analysis of variance designs for model output, Computer Physics Communication, 117, 35--43. A. Saltelli, P. Annoni, I. Azzini, F. Campolongo, M. Ratto and S. Tarantola, 2010, Variance based sensitivity analysis of model output. Design and estimator for the total sensitivity index, Computer Physics Communications 181, 259--270.

See Also

sobol, sobol2002, sobol2007, sobolEff, sobolmara

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 <- soboljansen(model = sobol.fun, X1, X2, nboot = 100)
print(x)
plot(x)

Run the code above in your browser using DataLab