Global Sensitivity Analysis
gsa_binning.RdThis function performs a binning based estimation of the global sensitivity of a model's output with respect to the model's parameters. The output can be a prediction of the model's behaviour in a scenario of interest (parameters, input, intial values, boundary conditions, scheduled events etc.). The output models a potentially measurable value (the "observable"). The sample-rows and the output rows must correspond (they must be from the same model simulation).
Arguments
- parSample
a matrix of parameter vectors (rows)
- outputSample
a matrix, with rows of outputs (row-index is the sample index)
- nBins
number of bins, if unset defaults to the default of the hist function
Examples
rprior <- rNormalPrior(c(-1,0,1),c(1,2,3))
X <- rprior(10000)
colnames(X) <- LETTERS[seq(3)]
Z <- exp(X[,1,drop=FALSE]+X[,2,drop=FALSE])
colnames(Z) <- "alpha"
GSA <- gsa_binning(X,Z)
print(GSA)
#> A B C
#> alpha 0.0430478 0.4522683 0.0002483376
cat("global sensitivity of alpha with respect to B: ",GSA['alpha','B'],"\n")
#> global sensitivity of alpha with respect to B: 0.4522683