Learn R Programming

sensitivity (version 1.12.1)

support: Support indices: Measuring the effect of input variables over their support

Description

Function to estimate and plot the support index functions (first order and total) for one variable (Fruth et al., 2016) xi

Usage

support(fun, d, xi = 1, h = 0.01, n = 5000, n.points = 50, q, q.arg, ...)

Arguments

fun
a function defining the model to analyze.
d
number of input variables of the model.
xi
the number of the studied input variable.
h
small over which to approximate the derivative.
n
number of Monte Carlo estimates.
n.points
number of equally spread points over the domain to evaluate the function.
q
a vector of quantile functions names corresponding to wanted factors distributions (see details below).
q.arg
a list of quantile functions parameters (see details below).
...
any other arguments for the plot of the support indices which are passed unchanged each time it is called.

Value

  • support returns a list, containing the first order support indices and the total support indices Note that the function returns plot and values at the same time.

Details

If the arguments q and q.args are not given, the factors are taken uniformly distributed on $[0,1]$. The argument q must be list of character strings, giving the names of the quantile functions (one for each factor), such as qunif, qnorm...It can also be a single character string, meaning same distribution for all. The argument q.arg must be a list of lists, each one being additional parameters for the corresponding quantile function. For example, the parameters of the quantile function qunif could be list(min=1, max=2), giving an uniform distribution on $[1,2]$. If q is a single character string, then q.arg must be a single list (rather than a list of one list).

References

J. Fruth, O. Roustant, S. Kuhnt, Support indices: Measuring the effects of input variables over their support, 2016, submitted.

Examples

Run this code
col1 <- "lightskyblue1"
colT <- "lightskyblue4"
ylim <- c(0,75)
n.points <- 50  

#X1
a <- support(fun=ishigami.fun, d=3, xi=1, h=0.01, n=5000, n.points=n.points, 
        q="qunif", q.arg=list(min=-pi, max=pi), ylim=ylim, xaxt="n", ylab="$X1$")
legend("topleft", legend=c("first-order support index", "total support index"), 
  fill=c(col1,colT), bty="n")

#x2
support(fun=ishigami.fun, d=3, xi=2, h=0.01, n=5000, n.points=n.points, 
        q="qunif", q.arg=list(min=-pi, max=pi), ylim=ylim, xaxt="n", ylab="$X2$")
legend("topleft", legend=c("first-order support index", "total support index"), 
  fill=c(col1,colT), bty="n")

#x3
support(fun=ishigami.fun, d=3, xi=3, h=0.01, n=5000, n.points=n.points, 
        q="qunif", q.arg=list(min=-pi, max=pi), ylim=ylim, ylab="$X3$")
legend("topleft", legend=c("first-order support index", "total support index"), 
  fill=c(col1,colT), bty="n")

Run the code above in your browser using DataLab