sensitivity: Calculate sensitivity according to the FAST algorithm

Description Usage Arguments Value Author(s) References See Also Examples

Description

sensitivity calculates the sensitivity from a series of model outputs (x) according to the FAST alogrithm.

Usage

1
2
3
4
5
6
sensitivity(x, numberf, order = 4, make.plot = FALSE, show.legend
                 = TRUE, plot.max = max(ff[-1]), include.total.variance
                 = FALSE, cukier = TRUE, names = paste(sep = "", "P",
                 1:numberf), main = "", xlab = "frequency", ylab =
                 "Fourier Coef", pch = rep(0, numberf), col =
                 (1:numberf) + 1, reorder = 1:numberf, ...)

Arguments

x

A vector of model outputs where parameters vary between runs according to the fast algorithm.

numberf

Number of parameters varied.

order

Order of parameter frequency independence (see Cukier)

make.plot

plot the Fourier spectrum?

plot.max

xmax in the spectrum

include.total.variance

include the sum of all variances in the result list.

pch

see par

col

see par

...

Additional parameters passed to plot

xlab

see par

ylab

see par

main

Title for the plot

show.legend

Boolean indicating whether to plot the legend

names

A vector of parameter names.

cukier

boolean: Calculate FAST-parameters according to Cukier 1975 or McRae 1982

reorder

A vector of indices that allows to use a different order for the parameters. This is important to check effects of the sampling scheme on results. Use the same as for fast_parameters

Value

A list of the partial variance accounted for by each parameter.

Author(s)

Dominik Reusser

References

Reusser, Dominik E., Wouter Buytaert, and Erwin Zehe. "Temporal dynamics of model parameter sensitivity for computationally expensive models with FAST (Fourier Amplitude Sensitivity Test)." Water Resources Research 47 (2011): W07551.

CUKIER, R. I.; SCHAIBLY, J. H. & SHULER, K. E. Study Of Sensitivity Of Coupled Reaction Systems To Uncertainties In Rate Coefficients .3. Analysis Of Approximations Journal Of Chemical Physics, 1975 , 63 , 1140-1149

McRae, G.; Tilden, J. & Seinfeld, J. Global sensitivity analysis - a computational implementation of the Fourier amplitude sensitivity test (FAST) Comput. Chem. Eng., 1982 , 6 , 15-25

See Also

S, fast

Examples

1
2
3
4
5
6
7
8
9
example_model1<-function(p,x){
   return(p[1]*x+p[2]*(1-x))
}
paras<-fast_parameters(min=c(0,0,0),max=c(1,2,2))
paras
model_results <- apply(paras, 1, example_model1, x=0.5)
model_results
sensitivity <- sensitivity(x=model_results, numberf=3, make.plot=TRUE)
sensitivity

Example output

Loading required package: zoo

Attaching package: 'zoo'

The following objects are masked from 'package:base':

    as.Date, as.Date.numeric

           P1        P2        P3
1  0.00000000 0.4444444 0.6666667
2  0.05555556 1.4444444 2.0000000
3  0.11111111 1.6666667 0.5555556
4  0.16666667 0.6666667 0.7777778
5  0.22222222 0.2222222 1.8888889
6  0.27777778 1.2222222 0.4444444
7  0.33333333 1.8888889 0.8888889
8  0.38888889 0.8888889 1.7777778
9  0.44444444 0.0000000 0.3333333
10 0.50000000 1.0000000 1.0000000
11 0.55555556 2.0000000 1.6666667
12 0.61111111 1.1111111 0.2222222
13 0.66666667 0.1111111 1.1111111
14 0.72222222 0.7777778 1.5555556
15 0.77777778 1.7777778 0.1111111
16 0.83333333 1.3333333 1.2222222
17 0.88888889 0.3333333 1.4444444
18 0.94444444 0.5555556 0.0000000
19 1.00000000 1.5555556 1.3333333
 [1] 0.2222222 0.7500000 0.8888889 0.4166667 0.2222222 0.7500000 1.1111111
 [8] 0.6388889 0.2222222 0.7500000 1.2777778 0.8611111 0.3888889 0.7500000
[15] 1.2777778 1.0833333 0.6111111 0.7500000 1.2777778
[1] 0.17002751 0.70037087 0.00293348

fast documentation built on May 2, 2019, 5:56 a.m.