Monte Carlo Estimation of Aggregated Sobol' Indices for multiple and functional outputs

Description

sobolMultOut implements the aggregated Sobol' indices for multiple outputs. It consists in averaging all the Sobol indices weighted by the variance of their corresponding output. Moreover, this function plots the functional (unidimensional) Sobol' indices for functional (unidimensional) model output. Sobol' indices for both first-order and total indices are estimated by Monte Carlo formulas.

Usage

1
2
3
4
5
6
sobolMultOut(model = NULL, q = 1, X1, X2, MCmethod = "sobol", 
                         plotFct=FALSE, ...)
## S3 method for class 'sobolMultOut'
print(x, ...)
## S3 method for class 'sobolMultOut'
plot(x, ylim = c(0, 1), ...)

Arguments

model

a function, or a model with a predict method, defining the model to analyze.

q

dimension of the model output vector.

X1

the first random sample.

X2

the second random sample.

MCmethod

a character string specifying the Monte-Carlo procedure used to estimate the Sobol indices. The avaible methods are : "sobol", "sobol2002", "sobol2007", "soboljansen", sobolmara, "sobolmartinez" and sobolGP.

plotFct

if TRUE, 1D functional Sobol indices ares plotted in an external window (default=FALSE).

x

a list of class MCmethod storing the state of the sensitivity study (parameters, data, estimates).

ylim

y-coordinate plotting limits.

...

any other arguments for model which are passed unchanged each time it is called

Details

For this function, there are several gaps: the bootstrap estimation of confidence intervals is not avalaible and the tell function does not work.

Value

sobolMultOut returns a list of class MCmethod, containing all its input arguments, plus the following components:

call

the matched call.

X

a data.frame containing the design of experiments.

y

the response used

V

the estimations of the aggregated 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 aggregated Sobol' first-order indices.

T

the estimations of the aggregated Sobol' total sensitivity indices.

Author(s)

Bertrand Iooss

References

M. Lamboni,H. Monod and D. Makowski, 2011, Multivariate sensitivity analysis to measure global contribution of input factors in dynamic models, Reliability Engineering and System Safety, 96:450-459.

F. Gamboa, A. Janon, T. Klein and A. Lagnoux, 2014, Sensitivity indices for multivariate outputs, Electronic Journal of Statistics, 8:575-603.

See Also

sobol, sobol2002, sobol2007, soboljansen, sobolmara, sobolmartinez, sobolGP

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
## Not run: 
# Functional toy function: Arctangent temporal function (Auder, 2011)
# X: input matrix (in [-7,7]^2)
# q: number of discretization steps of [0,2pi] interval
# output: vector of q values

atantemp <- function(X, q = 100){
  
  n <- dim(X)[[1]]
  t <- (0:(q-1)) * (2*pi) / (q-1)
  
  res <- matrix(0,ncol=q,nrow=n)
  for (i in 1:n) res[i,] <- atan(X[i,1]) * cos(t) + atan(X[i,2]) * sin(t)

  return(res)  
}

# Tests functional toy fct 

y0 <- atantemp(matrix(c(-7,0,7,-7,0,7),ncol=2))
#plot(y0[1,],type="l")
#apply(y0,1,lines)

n <- 100
X <- matrix(c(runif(2*n,-7,7)),ncol=2)
y <- atantemp(X)
x11()
plot(y0[2,],ylim=c(-2,2),type="l")
apply(y,1,lines)

# Sobol indices computations

n <- 1000
X1 <- data.frame(matrix(runif(2*n,-7,7), nrow = n))
X2 <- data.frame(matrix(runif(2*n,-7,7), nrow = n))

x11()
sa <- sobolMultOut(model=atantemp, q=100, X1, X2, 
                   MCmethod="soboljansen", plotFct=T)
print(sa)
x11()
plot(sa)


## End(Not run)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.