Description Usage Arguments Details Value See Also Examples
View source: R/coin_sensitivity.R
Post process a sample to obtain sensitivity indices. This function takes a univariate output
which is generated as a result of running a Monte Carlo sample from SA_sample()
through a system.
Then it estimates sensitivity indices using this sample.
1  SA_estimate(yy, N, d, Nboot = NULL)

yy 
A vector of model output values, as a result of a N(d+2) Monte Carlo design. 
N 
The number of sample points per dimension. 
d 
The dimensionality of the sample 
Nboot 
Number of bootstrap draws for estimates of confidence intervals on sensitivity indices. If this is not specified, bootstrapping is not applied. 
This function is built to be used inside sensitivity()
.
See COINr online documentation for more details.
A list with the output variance, plus a data frame of first order and total order sensitivity indices for
each variable, as well as bootstrapped confidence intervals if !is.null(Nboot)
.
sensitivity()
Perform global sensitivity or uncertainty analysis on a COIN
SA_sample()
Input design for estimating sensitivity indices
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17  # This is a generic example rather than applied to a COIN (for reasons of speed)
# A simple test function
testfunc < function(x){
x[1] + 2*x[2] + 3*x[3]
}
# First, generate a sample
X < SA_sample(500, 3)
# Run sample through test function to get corresponding output for each row
y < apply(X, 1, testfunc)
# Estimate sensitivity indices using sample
SAinds < SA_estimate(y, N = 500, d = 3, Nboot = 1000)
SAinds$SensInd
# Notice that total order indices have narrower confidence intervals than first order.

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.