Sensitivity Analysis in SimBiology
Sensitivity analysis lets you explore the effects of variations in model quantities (species, compartments, and parameters) on a model response. You can use the analysis to validate preexisting knowledge or assumption about influential model quantities on a model response or to find such quantities. You can use the information from sensitivity analysis for decision making, designing experiments, and parameter estimation. SimBiology® supports two types of sensitivity analyses: local sensitivity analysis and global sensitivity analysis.
Global sensitivity analysis uses Monte Carlo simulations, where a representative (global) set of parameter sample values are used to explore the effects of variations in model parameters of interest on the model response. GSA provides insights into relative contributions of individual parameters that contribute most to the overall model behavior.
On the other hand, local sensitivity analysis is derivative based. This technique analyzes the effect of one model parameter at a time, keeping the other parameters fixed. Local sensitivities are dependent on a specific choice of parameter values at a time point where the analysis is performed and do not capture how parameters interact with each other during simulation when they are varied jointly.
Global Sensitivity Analysis (GSA)
In GSA, model quantities are varied together to simultaneously evaluate the relative contributions of each quantity with respect to a model response. SimBiology provides the following features to perform GSA.
In this approach, SimBiology performs a decomposition of the model output (response) variance by calculating the first- and total-order Sobol indices . The first-order Sobol indices give the fractions of the overall response variance that can be attributed to variations in an input parameter alone. The total-order Sobol index gives the fraction of the overall response variance that can be attributed to joint parameter variations. For details, see Saltelli Method to Compute Sobol Indices.
sbiosobol to compute the Sobol indices. The function requires
Statistics and Machine Learning Toolbox™.
Multiparametric GSA (MPGSA)
MPGSA lets you study the relative importance of parameters with respect to a classifier defined by model responses. SimBiology implements the MPSA method proposed by Tiemann et al. . For details, see Multiparametric Global Sensitivity Analysis (MPGSA).
sbiompgsa to perform MPGSA. The function requires Statistics and Machine Learning Toolbox.
sbioelementaryeffects lets you assess the global sensitivity of
a model response with respect to variations in model parameters by computing the
means and standard deviations of the elementary effects of input parameters. An
elementary effect (EE) of an input parameter
P with respect to a model response R
is defined as: .
Here, EEP(x) is the elementary
effect of P . R(x) and
R(x+delta) are model responses at specific time or the
value of an observable, evaluated for parameter values
details, see Elementary Effects for Global Sensitivity Analysis.
Comparison of GSA Functions
|GSA Function||Sensitivity Measure||Considerations|
|It computes the fractions of total variance of a model response (sensitivity output) that can be attributed to individual model parameters (sensitivity inputs).||
It answers the question of whether variations in a model parameter (sensitivity input) have an influence on answering a modeling question. For example, the question might be: does a model parameter have an effect on the model response exceeding or falling below a target threshold?
You can define such a question using
a mathematical expression (classifier). For example, the
following classifier defines an exposure (area under the
curve) threshold for the target occupancy
It computes the means and standard deviations of elementary effects of sensitivity inputs with respect to a model response.
It assesses the average sensitivity by linear approximations of model responses, similar to averaged local sensitivities. It also assesses if the sensitivity of a model response is the same across the input parameter domain or if there is a spread of sensitivity values across the parameter domain.
Local Sensitivity Analysis (LSA)
In this analysis, SimBiology calculates the time-dependent sensitivities of all the species states with respect to species initial conditions and parameter values in the model.
Thus, if a model has a species
x, and two parameters
z, the time-dependent sensitivities
x with respect to each parameter value are the time-dependent derivatives
where, the numerator is the sensitivity output and the denominators are the sensitivity inputs to sensitivity analysis. For more information on the calculations performed, see .
Model Requirements for LSA
LSA is supported only by the ordinary differential equation (ODE) solvers. SimBiology calculates local sensitivities by combining the original ODE system for a model with the auxiliary differential equations for the sensitivities. The additional equations are derivatives of the original equations with respect to parameters. This method is sometimes called forward sensitivity analysis or direct sensitivity analysis. This larger system of ODEs is solved simultaneously by the solver.
LSA calculates derivatives by using a technique called complex-step
approximation. This technique yields accurate results for the vast majority of
typical reaction kinetics, which involve only simple mathematical operations and
functions. However, the complex-step approximation requires the functions to be
complex analytic, that is, to be infinitely differentiable in the complex plane.
This technique can produce inaccurate results when analyzing models that contain
mathematical expressions that involve nonanalytic functions, except
abs. If the model contains nonanalytic functions,
SimBiology either disables the sensitivity analysis or warns you that the
computed sensitivities may be inaccurate. If sensitivity analysis gives
questionable results for a model with reaction rates that contain unusual
functions, you may be running into limitations of the complex-step technique.
Contact MathWorks Technical Support for additional information.
abs are nonanalytic functions and are not compatible
with the complex-step approximation, SimBiology provides replacements of these
functions so that they become compatible and can be used for LSA. Note that:
The replacement function
simbio.complexstep.abs(x)is not differentiable when the real part of x is 0.
The replacement functions
simbio.complexstep.max(x,y)are not differentiable when x is equal to y.
For details, see .
If your model uses the
max functions, SimBiology automatically replaces them
You calculate local sensitivities using
SimFunctionSensitivityobject, or the Calculate Sensitivities program.
fitproblemuses local sensitivity analysis to determine the gradients of the objective function during parameter estimation.
Models containing the following active components do not support local sensitivity analysis:
You can perform sensitivity analysis on a model containing repeated assignment rules, but only if the repeated assignment rules do not determine species or parameters used as inputs or outputs in sensitivity analysis.
SUNDIALS as Default Solver
SimBiology always uses the SUNDIALS solver to perform
sensitivity analysis on a model, regardless of what you have selected as the
SolverType in the configuration set.
In addition, if you are estimating model parameters using
sbiofit or the Fit Data program with one of these gradient-based estimation
lsqcurvefit, SimBiology uses the
SUNDIALS solver by default to calculate sensitivities and use them to improve fitting. If you
sbiofit, you can turn off this sensitivity
calculation feature by setting the SensitivityAnalysis name-value pair argument to
false. However, if you are using the Fit Data program, you cannot turn
off this feature. It is recommended that you keep the sensitivity analysis feature on whenever
possible for more accurate gradient approximations and better parameter fits.
Calculate Local Sensitivities Using sbiosimulate
Set the following properties of the
SolverOptions property of your
configset object, before running the
SensitivityAnalysis — Set to
trueto calculate the time-dependent sensitivities of all the species states defined by the
Outputsproperty with respect to the initial conditions of the species and the values of the parameters specified in
SensitivityAnalysisOptions— An object that holds the sensitivity analysis options in the configuration set object. Properties of
Outputs— Specify the species and parameters for which you want to compute the sensitivities. This is the numerator as described in Sensitivity Analysis.
Inputs— Specify the species and parameters with respect to which you want to compute the sensitivities. Sensitivities are calculated with respect to the
InitialAmountproperty of the specified species. This is the denominator, described in Sensitivity Analysis.
Normalization— Specify the normalization for the calculated sensitivities:
'None'— No normalization
'Half'— Normalization relative to the numerator (species output) only
'Full'— Full dedimensionalization
For more information about normalization, see
SolverOptions properties, calculate the
sensitivities of a model by providing the
model object as an
input argument to the
sbiosimulate function returns a
SimData object containing the
following simulation data:
Time points, state data, state names, and sensitivity data
Metadata such as the types and names for the logged states, the configuration set used during simulation, and the date of the simulation
SimData object is a convenient way of keeping time data,
state data, sensitivity data, and associated metadata together. A
SimData object has properties and methods associated with
it, which you can use to access and manipulate the data.
For illustrated examples, see:
Calculate Local Sensitivities Using SimFunctionSensitivity object
'SensitivityInputs' name-value pair arguments. Then
execute the object. For an illustrated example, see Calculate Local Sensitivities Using SimFunctionSensitivity Object.
Calculate Local Sensitivities Using SimBiology Model Analyzer App
For a workflow example using the app, see Find Important Tumor Growth Parameters with Local Sensitivity Analysis Using SimBiology Model Analyzer.
 Saltelli, Andrea, Paola Annoni, Ivano Azzini, Francesca Campolongo, Marco Ratto, and Stefano Tarantola. “Variance Based Sensitivity Analysis of Model Output. Design and Estimator for the Total Sensitivity Index.” Computer Physics Communications 181, no. 2 (February 2010): 259–70. https://doi.org/10.1016/j.cpc.2009.09.018.
 Tiemann, Christian A., Joep Vanlier, Maaike H. Oosterveer, Albert K. Groen, Peter A. J. Hilbers, and Natal A. W. van Riel. “Parameter Trajectory Analysis to Identify Treatment Effects of Pharmacological Interventions.” Edited by Scott Markel. PLoS Computational Biology 9, no. 8 (August 1, 2013): e1003166. https://doi.org/10.1371/journal.pcbi.1003166.
 Martins, Joaquim, Ilan Kroo, and Juan Alonso. “An Automated Method for Sensitivity Analysis Using Complex Variables.” In 38th Aerospace Sciences Meeting and Exhibit. Reno,NV,U.S.A.: American Institute of Aeronautics and Astronautics, 2000. https://doi.org/10.2514/6.2000-689.
 Martins, J., Peter Sturdza, and Juan Alonso. “The Connection between the Complex-Step Derivative Approximation and Algorithmic Differentiation.” In 39th Aerospace Sciences Meeting and Exhibit. Reno,NV,U.S.A.: American Institute of Aeronautics and Astronautics, 2001. https://doi.org/10.2514/6.2001-921.
 Ingalls, Brian P., and Herbert M. Sauro. “Sensitivity Analysis of Stoichiometric Networks: An Extension of Metabolic Control Analysis to Non-Steady State Trajectories.” Journal of Theoretical Biology 222, no. 1 (May 2003): 23–36. https://doi.org/10.1016/S0022-5193(03)00011-0.