
sobolEff
implements the Monte Carlo estimation of the Sobol' sensitivity indices using the asymptotically efficient formulas in section 4.2.4.2 of Monod et al. (2006). Either all first-order indices or all total-effect indices are estimated at a cost of
sobolEff(model = NULL, X1, X2, order=1, nboot = 0, conf = 0.95, …)
# S3 method for sobolEff
tell(x, y = NULL, …)
# S3 method for sobolEff
print(x, …)
# S3 method for sobolEff
plot(x, ylim = c(0, 1), …)
# S3 method for sobolEff
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.
an integer specifying the indices to estimate: 0 for total effect indices,1 for first-order indices and 2 for closed second-order indices.
the number of bootstrap replicates, or zero to use asymptotic standard deviation estimates given in Janon et al. (2012).
the confidence level for confidence intervals.
a list of class "sobolEff"
storing the state of the
sensitivity study (parameters, data, estimates).
a vector of model responses.
y-coordinate plotting limits.
any other arguments for model
which are passed
unchanged each time it is called.
sobolEff
returns a list of class "sobolEff"
, containing all
the input arguments detailed before, plus the following components:
the matched call.
a data.frame
containing the design of experiments.
a vector of model responses.
the estimations of the Sobol' sensitivity indices.
The estimator used by sobolEff is defined in Monod et al. (2006), Section 4.2.4.2 and studied under the name T_N in Janon et al. (2012). This estimator is good for large first-order indices.
Monod, H., Naud, C., Makowski, D. (2006), Uncertainty and sensitivity analysis for crop models in Working with Dynamic Crop Models: Evaluation, Analysis, Parameterization, and Applications, Elsevier.
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.
sobol, sobol2002, sobolSalt, sobol2007, soboljansen, sobolmartinez,
sobolSmthSpl
# 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])
n <- 1000
X1 <- data.frame(matrix(runif(8 * n), nrow = n))
X2 <- data.frame(matrix(runif(8 * n), nrow = n))
# sensitivity analysis
x <- sobolEff(model = sobol.fun, X1 = X1, X2 = X2, nboot = 0)
print(x)
library(ggplot2)
ggplot(x)
# }
Run the code above in your browser using DataLab