sobolSalt | R Documentation |
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\times(p+2)
model evaluations; or first-order, second-order and total indices at the same time (alltogether 2p+ p\times(p-1)/2
indices) at a total cost of n\times(2\times p+2)
model evaluations.
sobolSalt(model = NULL, X1, X2, scheme="A", nboot = 0, conf = 0.95, ...)
## S3 method for class 'sobolSalt'
tell(x, y = NULL, ...)
## S3 method for class 'sobolSalt'
print(x, ...)
## S3 method for class 'sobolSalt'
plot(x, ylim = c(0, 1), choice, ...)
## S3 method for class 'sobolSalt'
ggplot(data, mapping = aes(), ylim = c(0, 1), choice, ..., environment
= parent.frame())
model |
a function, or a model with a |
X1 |
the first random sample (containing |
X2 |
the second random sample (containing |
scheme |
a letter |
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. |
ylim |
y-coordinate plotting limits. |
choice |
an integer specifying which indices to plot: |
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 |
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.
sobolSalt
returns a list of class "sobolSalt"
, containing all
the input arguments detailed before, plus the following components:
call |
the matched call. |
X |
a |
y |
the response used. |
V |
the model variance. |
S |
the estimations of the Sobol' first-order indices. |
S2 |
the estimations of the Sobol' second-order indices (only for scheme |
T |
the estimations of the Sobol' total sensitivity indices. |
Laurent Gilquin
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.
sobol, sobol2007, soboljansen, sobolmartinez, sobolEff
# 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)
library(ggplot2)
ggplot(x, choice=1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.