Learn R Programming

sensitivity (version 1.12.1)

delsa: Distributed Evaluation of Local Sensitivity Analysis

Description

delsa implements Distributed Evaluation of Local Sensitivity Analysis to calculate first order parameter sensitivity at multiple locations in parameter space. The locations in parameter space can either be obtained by a call to parameterSets or by specifying X0 directly, in which case the prior variance of each parameter varprior also needs to be specified. Via plot (which uses functions of the package ggplot2 and reshape2), the indices can be visualized.

Usage

delsa(model = NULL, perturb=1.01,
  par.ranges, samples, method,
  X0, varprior,
  ...)
  
## S3 method for class 'delsa':
tell(x, y = NULL,\dots)

## S3 method for class 'delsa':
print(x, \dots)

## S3 method for class 'delsa':
plot(x, which=1:3, ask = dev.interactive(), ...)

Arguments

model
a function, or a model with a predict method, defining the model to analyze.
perturb
Perturbation used to calculate sensitivity at each evaluation location
par.ranges
A named list of minimum and maximum parameter values
samples
Number of samples to generate. For the "grid" and "innergrid"method, corresponds to the number of samples for each parameter, and may be a vector.
method
Sampling scheme. See parameterSets
X0
Parameter values at which to evaluate sensitivity indices. Can be used instead of specifying sampling method
varprior
Prior variance. If X0 is specified, varprior must also be specified.
...
any other arguments for model which are passed unchanged each time it is called.
x
a list of class "delsa" storing the state of the sensitivity study (parameters, data, estimates).
y
a vector of model responses.
which
if a subset of the plots is required, specify a subset of the numbers 1:3
ask
logical; if TRUE, the user is asked before each plot, see par(ask=.)

Value

  • delsa returns a list of class "delsa", containing all the input arguments detailed before, plus the following components:
  • callthe matched call.
  • Xa data.frame containing the design of experiments.
  • ya vector of model responses.
  • delsafirstthe first order indices for each location in X0

Details

print shows summary of the first order indices across parameter space. plot shows: (1) the cumulative distribution function of first order sensitivity across parameter space, (2) variation of first order sensitivity in relation to model response, and (3) sensitivity in relation to parameter value.

References

Rakovec, O., M. C. Hill, M. P. Clark, A. H. Weerts, A. J. Teuling, R. Uijlenhoet (2014), Distributed Evaluation of Local Sensitivity Analysis (DELSA), with application to hydrologic models, Water Resour. Res., 50, 1-18, doi:http://dx.doi.org/10.1002/2013WR014063{10.1002/2013WR014063}

See Also

parameterSets which is used to generate points, sensitivity for other methods in the package

Examples

Run this code
# Test case : the non-monotonic Sobol g-function
# (there are 8 factors, all following the uniform distribution on [0,1])

library(randtoolbox)
x <- delsa(model=sobol.fun,
           par.ranges=replicate(8,c(0,1),simplify=FALSE),
           samples=100,method="sobol")

# Summary of sensitivity indices of each parameter across parameter space
print(x)

library(ggplot2)
library(reshape2)
x11()
plot(x)

Run the code above in your browser using DataLab