| Title: | Global Sensitivity Analysis Tool |
|---|---|
| Description: | A tool to sensitivity analysis using SOBOL (Sobol, 1993) and AMA (Dell'Oca et al. 2017 <doi:10.5194/hess-21-6219-2017>) indices. It allows to identify the most sensitive parameter or parameters of a model. |
| Authors: | Camila Garcia-Echeverri [aut, cre] (ORCID: <https://orcid.org/0000-0001-8227-7684>), Maria Arenas-Bautista [cot] (ORCID: <https://orcid.org/0000-0003-1578-5157>), Leonardo Donado [cot] (ORCID: <https://orcid.org/0000-0002-5479-3419>) |
| Maintainer: | Camila Garcia-Echeverri <[email protected]> |
| License: | GPL-2 |
| Version: | 1.0.0 |
| Built: | 2026-05-22 07:05:44 UTC |
| Source: | https://github.com/cagarciae/gsa.un |
This function calculates the AMA indices: AMAE, AMAV, AMAV and AMAK.
AMA(data_Bstat, CM, pp_names, steps = 100)AMA(data_Bstat, CM, pp_names, steps = 100)
data_Bstat |
a data frame of dimensions t x 6, here t is the number of temporary steps and each column corresponds to a statistical measure: mean, variance, skewness, kurtosis and excess kurtosis. |
CM |
A list of arrays, each array corresponds to the conditional moments calculated with the mean, variance, skewness, kurtosis. Each array has dimensions of steps, t, p. |
pp_names |
vector that contains the names of the parameters (pp) |
steps |
number of divisions of the parametric range |
A list of four matrices, which corresponds to AMAE, AMAV, AMAR and AMAK indices. Each matrix has dimensions of t x pp.
Camila Garcia-Echeverri <[email protected]>
Maria Cristina Areas-Bautista <[email protected]>
Hydrodynamics of the natural media research group - HYDS National University of Colombia - Bogota
Dell’Oca, A., Riva, M., & Guadagnini, A. (2017). Moment-based metrics for global sensitivity analysis of hydrological systems. Hydrology and Earth System Sciences, 21(12), 6219–6234. https://doi.org/10.5194/hess-21-6219-2017
data("data_Bstat", "CM", "pp_names") AMA_indices <- AMA(data_Bstat, CM, pp_names, steps= 15)data("data_Bstat", "CM", "pp_names") AMA_indices <- AMA(data_Bstat, CM, pp_names, steps= 15)
This function calculates the mean, variance, skewness, kurtosis and excess kurtosis of a model output, this output can be given for different temporal periods (days, months or years).
Bstat(out_set)Bstat(out_set)
out_set |
matrix of dimensions n x t, where n equals the number of runs and t is equal to the number of temporary steps. |
a data frame of dimensions t x 6, here t is the number of temporary steps and each column corresponds to a statistical measure: mean, variance, skewness, kurtosis and excess kurtosis.
Camila Garcia-Echeverri <[email protected]>
Hydrodynamics of the natural media research group - HYDS National University of Colombia - Bogota
data("out_set") data_Bstat <- Bstat(out_set)data("out_set") data_Bstat <- Bstat(out_set)
@description Data generated by Cond_Moments example
CMCM
A list
A list of arrays, each array has dimensions of steps, t, pp
Camila Garcia-Echeverri
This function evaluates the first four statistical moments after grouping the model output by different parametric ranges.
Cond_Moments(parameters_set, out_set, pp_names, steps = 100)Cond_Moments(parameters_set, out_set, pp_names, steps = 100)
parameters_set |
matrix of dimensions n x pp, where n is the number of runs and pp is the number of parameters. |
out_set |
matrix of dimensions n x t, where n is the number of runs and t is the number of temporary steps. |
pp_names |
vector that contains the names of the parameters. |
steps |
number of divisions of the parametric range. |
A list of arrays, each array has dimensions of steps, t, pp.
Camila Garcia-Echeverri <[email protected]>
Maria Cristina Areas-Bautista <[email protected]>
Hydrodynamics of the natural media research group - HYDS National University of Colombia - Bogota
data("parameters_set", "out_set", "pp_names") CM <- Cond_Moments(parameters_set, out_set, pp_names, steps=15)data("parameters_set", "out_set", "pp_names") CM <- Cond_Moments(parameters_set, out_set, pp_names, steps=15)
@description Data generated with the example of the function Cond_Moments
data_Bstatdata_Bstat
A data.frame
a data frame of dimensions t x 6
Camila Garcia-Echeverri
Function Bstat
This function performs the global sensitivity analysis starting from the gross results of the model.
GSAtool( parameters_set, out_set, pp_names, steps = 100, save = FALSE, dir = NULL )GSAtool( parameters_set, out_set, pp_names, steps = 100, save = FALSE, dir = NULL )
parameters_set |
matrix of dimensions n x pp, where n is the number of runs and pp is the number of parameters. |
out_set |
matrix of dimensions n x t, where n is the number of runs and t is the number of temporary steps. |
pp_names |
a strings vector with the names of the parameters of the model |
steps |
number of divisions of the parametric range. |
save |
T to save the results in .csv files, by default save=F. |
dir |
a directory to save the results |
a list containing two outputs: SOBOL and AMA indices.
Camila Garcia-Echeverri <[email protected]>
Maria Cristina Areas-Bautista <[email protected]>
Hydrodynamics of the natural media research group - HYDS National University of Colombia - Bogota
Dell’Oca, A., Riva, M., & Guadagnini, A. (2017). Moment-based metrics for global sensitivity analysis of hydrological systems. Hydrology and Earth System Sciences, 21(12), 6219–6234. https://doi.org/10.5194/hess-21-6219-2017
Sobol, I. M. (2001). Global sensitivity indices for nonlinear mathematical models and their Monte Carlo estimates. Mathematics and Computers in Simulation, 55(1–3), 271–280. https://doi.org/10.1016/S0378-4754(00)00270-6
data("parameters_set", "out_set", "pp_names") GSA_results <- GSAtool(parameters_set, out_set, pp_names, steps = 15, save=FALSE)data("parameters_set", "out_set", "pp_names") GSA_results <- GSAtool(parameters_set, out_set, pp_names, steps = 15, save=FALSE)
@description Output generated with an example mathematical model.
out_setout_set
A matrix
a matrix of dimensions 500 x 365 (pp x t), runs of the model x temporary steps (365 days)
Arenas-Bautista, M. C. (2020). Integration of Hydrological and Economical Aspects for Water Management in Tropical Regions. Case Study: Middle Magdalena Valley, Colombia. National University of Colombia.
@description It contains 10 parameters
parameters_setparameters_set
A matrix
a matrix of dimensions 500 x 10 (n x pp),runs of the model x number of parameters
Arenas-Bautista, M. C. (2020). Integration of Hydrological and Economical Aspects for Water Management in Tropical Regions. Case Study: Middle Magdalena Valley, Colombia. National University of Colombia.
@description 10 parameters names.
pp_namespp_names
A value
a vector of characters
CGE
Arenas-Bautista, M. C. (2020). Integration of Hydrological and Economical Aspects for Water Management in Tropical Regions. Case Study: Middle Magdalena Valley, Colombia. National University of Colombia.
This function helps to save the results in .csv format
save_results( SOBOL = NULL, SOBOL_total = NULL, amae = NULL, amav = NULL, amar = NULL, amak = NULL, dir )save_results( SOBOL = NULL, SOBOL_total = NULL, amae = NULL, amav = NULL, amar = NULL, amak = NULL, dir )
SOBOL |
SOBOL index |
SOBOL_total |
SOBOL_total |
amae |
AMAE index |
amav |
AMAV index |
amar |
AMAR index |
amak |
AMAK index |
dir |
a directory to save the results |
Camila Garcia-Echeverri <[email protected]>
Hydrodynamics of the natural media research group - HYDS National University of Colombia - Bogota
This function calculates the first order and total SOBOL indices.
SOBOL(data_var, CM_mean, CM_var, pp_names)SOBOL(data_var, CM_mean, CM_var, pp_names)
data_var |
a vector containing the variance of the model output for each modelling time step. |
CM_mean |
An array containing the conditional mean of each parameter of the model. This array has dimensions of steps x t x pp, where steps is the number of divisions of the parametric range, t is the number of temporary steps and pp the number of parameters of the model. |
CM_var |
An array containing the conditional variance of each parameter of the model. This array has dimensions of steps x t x pp, where steps is the number of divisions of the parametric range, t is the number of temporary steps and pp the number of parameters of the model. |
pp_names |
a strings vector with the names of the parameters of the model. |
a list containing two matrices. The first contains the first order sobol, the second sobol_total.
Camila Garcia-Echeverri <[email protected]>
Maria Cristina Areas-Bautista <[email protected]>
Hydrodynamics of the natural media research group - HYDS National University of Colombia - Bogota
Sobol, I. M. (2001). Global sensitivity indices for nonlinear mathematical models and their Monte Carlo estimates. Mathematics and Computers in Simulation, 55(1–3), 271–280. https://doi.org/10.1016/S0378-4754(00)00270-6
data("data_Bstat", "CM", "pp_names") SOBOL_indices <- SOBOL(data_Bstat[,3], CM$CM_mean, CM$CM_var , pp_names)data("data_Bstat", "CM", "pp_names") SOBOL_indices <- SOBOL(data_Bstat[,3], CM$CM_mean, CM$CM_var , pp_names)