# 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.
Run the code above in your browser using DataLab