Learn R Programming

sensitivity (version 1.14.0)

sobolSalt: Monte Carlo Estimation of Sobol' Indices based on Saltelli schemes

Description

sobolSalt implements the Monte Carlo estimation of the Sobol' indices for either both first-order and total effect indices at the same time (alltogether $2p$ indices) at a total cost of $n*(p + 2)$ model evaluations; or first-order, second-order and total indices at the same time (alltogether $2p+ p*(p-1)/2$ indices) at a total cost of $n*(2*p + 2)$ model evaluations.

Usage

sobolSalt(model = NULL, X1, X2, scheme="A", nboot = 0, conf = 0.95, ...) "tell"(x, y = NULL, ...) "print"(x, ...) "plot"(x, ylim = c(0, 1), choice, ...)

Arguments

model
a function, or a model with a predict method, defining the model to analyze.
X1
the first random sample (containing n points).
X2
the second random sample (containing n points).
scheme
a letter "A" or "B" indicating which scheme to use (see "Details")
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.
ylim
y-coordinate plotting limits.
choice
an integer specifying which indices to plot: 1 for first-order and total effect indices, 2 for second-order indices.
...
any other arguments for model which are passed unchanged each time it is called

Value

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

Details

The estimators used are the one implemented in "sobolEff".

scheme specifies which Saltelli's scheme is to be used: "A" to estimate both first-order and total effect indices, "B" to estimate first-order, second-order and total effect indices.

References

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.

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

See Also

sobol, sobol2007, soboljansen, sobolmartinez, sobolEff

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 <- sobolSalt(model = sobol.fun, X1, X2, scheme="A", nboot = 100)
print(x)
plot(x, choice=1)

Run the code above in your browser using DataLab