sobol {sensitivity} | R Documentation |
Monte Carlo Estimation of Sobol' Indices
Description
sobol
implements the Monte Carlo estimation of
the Sobol' sensitivity indices (standard estimator). This method allows the estimation of
the indices of the variance decomposition, sometimes referred to as
functional ANOVA decomposition, up to a given order, at a total cost
of (N+1) \times n
where N
is the number
of indices to estimate. This function allows also the estimation of
the so-called subset (or group) indices, i.e. the first-order indices with respect to
single multidimensional inputs.
Usage
sobol(model = NULL, X1, X2, order = 1, nboot = 0, conf = 0.95, ...)
## S3 method for class 'sobol'
tell(x, y = NULL, return.var = NULL, ...)
## S3 method for class 'sobol'
print(x, ...)
## S3 method for class 'sobol'
plot(x, ylim = c(0, 1), ...)
## S3 method for class 'sobol'
plotMultOut(x, ylim = c(0, 1), ...)
## S3 method for class 'sobol'
ggplot(data, mapping = aes(), ylim = c(0, 1), ..., environment
= parent.frame())
Arguments
model |
a function, or a model with a |
X1 |
the first random sample. |
X2 |
the second random sample. |
order |
either an integer, the maximum order in the ANOVA decomposition (all indices up to this order will be computed), or a list of numeric vectors, the multidimensional compounds of the wanted subset indices. |
nboot |
the number of bootstrap replicates. |
conf |
the confidence level for bootstrap confidence intervals. |
x |
a list of class |
data |
a list of class |
y |
a vector of model responses. |
return.var |
a vector of character strings giving further
internal variables names to store in the output object |
ylim |
y-coordinate plotting limits. |
mapping |
Default list of aesthetic mappings to use for plot. If not specified, must be supplied in each layer added to the plot. |
environment |
[Deprecated] Used prior to tidy evaluation. |
... |
any other arguments for |
Value
sobol
returns a list of class "sobol"
, containing all
the input arguments detailed before, plus the following components:
call |
the matched call. |
X |
a |
y |
a vector of model responses. |
V |
the estimations of Variances of the Conditional Expectations (VCE) with respect to one factor or one group of factors. |
D |
the estimations of the terms of the ANOVA decomposition (not for subset indices). |
S |
the estimations of the Sobol' sensitivity indices (not for subset indices). |
Users can ask more ouput variables with the argument
return.var
(for example, bootstrap outputs V.boot
,
D.boot
and S.boot
).
Author(s)
Gilles Pujol
References
I. M. Sobol, 1993, Sensitivity analysis for non-linear mathematical model, Math. Modelling Comput. Exp., 1, 407–414.
See Also
sobol2002, sobolSalt, sobol2007, soboljansen,
sobolmartinez
,sobolEff, sobolSmthSpl, sobolmara,
sobolroalhs, fast99, sobolGP
,sobolMultOut
Examples
# 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 <- sobol(model = sobol.fun, X1 = X1, X2 = X2, order = 2, nboot = 100)
print(x)
#plot(x)
library(ggplot2)
ggplot(x)