sensitivity (version 1.3-1)

sobol: Sobol Non-linear Sensitivity Analysis

Description

sobol is the implementation of the Monte Carlo estimation of the Sobol indices.

Usage

sobol(method = "sobol93", model = NULL, x1, x2,
      max.order = 1, nboot = 0, conf = 0.95, ...)

Arguments

method
the method: "sobol93" or "saltelli02"
model
the model
x1
the first random sample
x2
the second random sample
max.order
the maximum order of indices to compute (method "sobol93")
nboot
the number of bootstrap replicates
conf
the confidence level for bootstrap confidence intervals
...
any other arguments for model which are passed unchanged each time it is called

Value

  • sobol returns an object of class "sobol". An object of class "sobol" is a list containing the following components:
  • xthe factor sample
  • ythe response used
  • Sthe estimations of the Sobol sensitivity indices
  • Stthe estimations of the total indices (method "saltelli02")

Computational cost

For the method "sobol93", the number of model evaluations is $n \times (N+1)$ where $n$ is the size of the samples x1 and x2, and $N$ is the number of indices to estimate.

For the method "saltelli02", the number of model evaluations is $n \times (p+2)$ where $p$ is the number of factors (for the estimation of $2p$ indices).

Details

Two methods. The method "sobol93" computes all the Sobol indices (coming from the HDMR-ANOVA decomposition) from order 1 to order given by the argument max.order. The method "saltelli02" computes both first order and total indices at a reduced computational cost. model is a function or a predictor (a class with a predict method) computing the response y based on the sample given by x. If no model is specified, the indices will be computed when one gives the response.

The Monte Carlo estimation requires two independent random samples x1 and x2. They must have the same dimensions.

References

Saltelli, A., Chan, K. and Scott, E. M., 2000, Sensitivity analysis. Wiley.

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

Saltelli, A., 2002, Making best use of model evaluations to compute sensitivity indices. Computer Physics Communication, 145, 580--297.

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
x <- data.frame(matrix(nr = 2 * n, nc = 8))
for (i in 1:8)
  x[, i] <- runif(2 * n)

# sensitivity analysis

sa <- sobol(model = sobol.fun, x1 = x[1:n,], x2 = x[(n+1):(2*n),], max.order = 2, nboot = 100)
print(sa)
#plot(sa)

Run the code above in your browser using DataLab