sensitivity (version 1.16.2)

sobolMultOut: 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 computes and 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

sobolMultOut(model = NULL, q = 1, X1, X2, MCmethod = "sobol", 
                         plotFct=FALSE, …)
# S3 method for sobolMultOut
print(x, …)
# S3 method for sobolMultOut
plot(x, ylim = c(0, 1), …)
# S3 method for sobolMultOut
ggplot(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 and sobolGP.

plotFct

if TRUE, 1D functional Sobol indices are computed and 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

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 \(X_i\)").

S

the estimations of the aggregated Sobol' first-order indices.

T

the estimations of the aggregated Sobol' total sensitivity indices.

Sfct

the estimations of the functional Sobol' first-order indices (if PlotFct=TRUE).

Tfct

the estimations of the functional Sobol' total sensitivity indices (if PlotFct=TRUE).

Details

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

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, sobolGP

Examples

Run this code
# NOT RUN {
# Tests on the functional toy fct 'Arctangent temporal function'

y0 <- atantemp.fun(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.fun(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.fun, q=100, X1, X2, 
                   MCmethod="soboljansen", plotFct=TRUE)
print(sa)
x11()
plot(sa)

library(ggplot2)
ggplot(sa)
# }

Run the code above in your browser using DataLab