Description Usage Arguments Value References Examples
sobol2002
implements the Monte Carlo estimation of
the Sobol' indices for both first-order and total indices at the same
time (alltogether 2p indices), at a total cost of (p + 2) * n model evaluations.
1 2 3 4 5 6 7 |
model |
a function, or a model with a |
X1 |
the first random sample. |
X2 |
the second random sample. |
nboot |
the number of bootstrap replicates. |
conf |
the confidence level for bootstrap confidence intervals. |
x |
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. |
... |
any other arguments for |
sobol2002
returns a list of class "sobol2002"
, containing all
the input arguments detailed before, plus the following components:
call |
the matched call. |
X |
a |
y |
the response used |
V |
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 Xi"). |
S |
the estimations of the Sobol' first-order indices. |
T |
the estimations of the Sobol' total sensitivity indices. |
Users can ask more ouput variables with the argument
return.var
(for example, bootstrap outputs V.boot
,
S.boot
and T.boot
).
A. Saltelli, 2002, Making best use of model evaluations to compute sensitivity indices, Computer Physics Communication, 145, 580–297.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | # 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 <- sobol2002(model = sobol.fun, X1, X2, nboot = 100)
print(x)
plot(x)
|
Call:
sobol2002(model = sobol.fun, X1 = X1, X2 = X2, nboot = 100)
Model runs: 10000
First order indices:
original bias std. error min. c.i. max. c.i.
X1 0.772663777 -3.505939e-04 0.0735226793 0.5941208077 0.931199301
X2 0.181521631 4.835765e-03 0.0428905091 0.0885254055 0.259131025
X3 0.032407185 -1.124696e-03 0.0150697862 0.0017941259 0.058114904
X4 0.007928388 -4.749885e-04 0.0085572470 -0.0102727687 0.026694593
X5 0.000455648 3.136872e-05 0.0007955689 -0.0014202715 0.001919533
X6 0.002572585 -3.051926e-05 0.0006641615 0.0012351322 0.003883425
X7 0.002644076 1.061585e-04 0.0009785932 0.0007101465 0.004512303
X8 0.001962201 5.097122e-05 0.0008890980 0.0001361504 0.003671878
Total indices:
original bias std. error min. c.i. max. c.i.
X1 0.6890511145 5.425975e-06 0.058730781 0.581259379 0.821196296
X2 0.2217119642 -5.534338e-03 0.052271693 0.136215148 0.347241490
X3 0.0344540099 -1.138559e-03 0.024066477 -0.013418609 0.089228372
X4 0.0164565906 1.218419e-03 0.011754435 -0.005732779 0.042893826
X5 -0.0002920481 -1.112492e-05 0.001184130 -0.002517972 0.002187899
X6 -0.0041463566 4.704660e-05 0.001044492 -0.006396229 -0.002198296
X7 -0.0041774574 -9.950025e-05 0.001204040 -0.006646766 -0.001913350
X8 -0.0013667056 -1.527023e-04 0.001303396 -0.003761693 0.001161511
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.