# sobol: Monte Carlo Estimation of Sobol' Indices In sensitivity: Global Sensitivity Analysis of Model Outputs

## 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) * 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

 ```1 2 3 4 5 6 7``` ```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), ...) ```

## Arguments

 `model` a function, or a model with a `predict` method, defining the model to analyze. `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 `"sobol"` storing the state of the sensitivity study (parameters, data, estimates). `y` a vector of model responses. `return.var` a vector of character strings giving further internal variables names to store in the output object `x`. `ylim` y-coordinate plotting limits. `...` any other arguments for `model` which are passed unchanged each time it is called.

## 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 `data.frame` containing the design of experiments. `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`).

Gilles Pujol

## References

I. M. Sobol, 1993, Sensitivity analysis for non-linear mathematical model, Math. Modelling Comput. Exp., 1, 407–414.

```sobol2002, sobolSalt, sobol2007, soboljansen, sobolmartinez, sobolEff, sobolSmthSpl, sobolmara, sobolroalhs, fast99, sobolGP, sobolMultOut```

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13``` ```# 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) ```

### Example output

```Call:
sobol(model = sobol.fun, X1 = X1, X2 = X2, order = 2, nboot = 100)

Model runs: 37000

Sobol indices
original         bias std. error   min. c.i. max. c.i.
X1     0.729983274 -0.002724371 0.05463013  0.63829355 0.8539957
X2     0.155743133 -0.008194829 0.06930343  0.01063350 0.3060890
X3     0.007320486 -0.012018319 0.07080107 -0.12647383 0.1445122
X4    -0.008958455 -0.011951854 0.07197804 -0.15442807 0.1196850
X5    -0.025438307 -0.011402455 0.07091697 -0.16723837 0.1067600
X6    -0.025113781 -0.011551661 0.07105081 -0.16583733 0.1076781
X7    -0.025815871 -0.011461163 0.07101916 -0.16681211 0.1058842
X8    -0.025806901 -0.011506514 0.07085417 -0.16745541 0.1067148
X1*X2  0.043159159  0.013198495 0.08584614 -0.12168165 0.2217146
X1*X3  0.033652209  0.010667270 0.07226473 -0.09906224 0.1660400
X1*X4  0.033441258  0.011706759 0.07155258 -0.10711362 0.1794831
X1*X5  0.025720702  0.011519542 0.07081985 -0.10561393 0.1658556
X1*X6  0.025403090  0.011432778 0.07091811 -0.10641551 0.1664929
X1*X7  0.025343026  0.011454304 0.07079661 -0.10633091 0.1654937
X1*X8  0.025918724  0.011570091 0.07091514 -0.10537275 0.1666589
X2*X3  0.026088266  0.011505522 0.07171386 -0.11026784 0.1721118
X2*X4  0.024583534  0.011330270 0.07040709 -0.10798800 0.1606904
X2*X5  0.026436273  0.011563954 0.07096735 -0.10565643 0.1667982
X2*X6  0.025985068  0.011450625 0.07087995 -0.10590559 0.1667905
X2*X7  0.025724582  0.011566807 0.07089588 -0.10581315 0.1662855
X2*X8  0.026180761  0.011499092 0.07092764 -0.10578789 0.1668590
X3*X4  0.026663997  0.011317905 0.07096703 -0.10694571 0.1684331
X3*X5  0.026051753  0.011514567 0.07088083 -0.10593795 0.1666821
X3*X6  0.025777981  0.011512564 0.07092387 -0.10605704 0.1665119
X3*X7  0.026105036  0.011501507 0.07088862 -0.10595084 0.1667207
X3*X8  0.025987934  0.011523339 0.07091115 -0.10588322 0.1667805
X4*X5  0.025997553  0.011512679 0.07089354 -0.10592705 0.1667483
X4*X6  0.025801828  0.011516892 0.07090737 -0.10608295 0.1665317
X4*X7  0.025937196  0.011509499 0.07090932 -0.10598455 0.1666967
X4*X8  0.025932997  0.011504672 0.07090891 -0.10598625 0.1666101
X5*X6  0.025910542  0.011509820 0.07090721 -0.10600991 0.1666211
X5*X7  0.025921814  0.011508909 0.07090598 -0.10599925 0.1666281
X5*X8  0.025915299  0.011510279 0.07090757 -0.10601117 0.1666348
X6*X7  0.025919954  0.011510307 0.07090741 -0.10599859 0.1666351
X6*X8  0.025923207  0.011508909 0.07090711 -0.10599074 0.1666233
X7*X8  0.025909889  0.011509173 0.07090768 -0.10600563 0.1666177
```

sensitivity documentation built on Sept. 24, 2017, 1:05 a.m.