
sobol2002
implements the Monte Carlo estimation of
the Sobol' indices for both first-order and total indices at the same
time (alltogether
sobol2002(model = NULL, X1, X2, nboot = 0, conf = 0.95, …)
# S3 method for sobol2002
tell(x, y = NULL, return.var = NULL, …)
# S3 method for sobol2002
print(x, …)
# S3 method for sobol2002
plot(x, ylim = c(0, 1), …)
# S3 method for sobol2002
plotMultOut(x, ylim = c(0, 1), …)
# S3 method for sobol2002
ggplot(x, ylim = c(0, 1), …)
a function, or a model with a predict
method,
defining the model to analyze.
the first random sample.
the second random sample.
the number of bootstrap replicates.
the confidence level for bootstrap confidence intervals.
a list of class "sobol"
storing the state of the
sensitivity study (parameters, data, estimates).
a vector of model responses.
a vector of character strings giving further
internal variables names to store in the output object x
.
y-coordinate plotting limits.
any other arguments for model
which are passed
unchanged each time it is called
sobol2002
returns a list of class "sobol2002"
, containing all
the input arguments detailed before, plus the following components:
the matched call.
a data.frame
containing the design of experiments.
the response used
the 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
the estimations of the Sobol' first-order indices.
the estimations of the Sobol' total sensitivity indices.
BE CAREFUL! This estimator suffers from a conditioning problem when estimating
the variances behind the indices computations. This can seriously affect the
Sobol' indices estimates in case of largely non-centered output. To avoid this
effect, you have to center the model output before applying "sobol2002"
.
Functions "sobolEff"
, "soboljansen"
and "sobolmartinez"
do not suffer from this problem.
A. Saltelli, 2002, Making best use of model evaluations to compute sensitivity indices, Computer Physics Communication, 145, 580--297.
sobol, sobolSalt, sobol2007, soboljansen, sobolmartinez, sobolEff, sobolmara, sobolGP,sobolMultOut
# NOT RUN {
# 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 <- sobol2002(model = sobol.fun, X1, X2, nboot = 100)
print(x)
plot(x)
library(ggplot2)
ggplot(x)
# }
Run the code above in your browser using DataLab