# Global Sensitivity Analysis

Sensitivity analysis (SA) is the study of how uncertainty in the output of a model can be apportioned to different sources of uncertainty in the model input. A sensitivity analysis is considered to be global when all the input factors are varied simultaneously and the sensitivity is evaluated over the entire range of each input factor. It provides an overall view on the influence of inputs on outputs as opposed to a local view of partial derivatives as in local sensitivity analysis.

GlobalSensitivity currently provides the following global sensitivity analysis methods:

- Morris OAT Method
- Sobol Method
- eFAST Method
- Regression based sensitivity
- Derivative Based Global Sensitivity Measures

Global Sensitivity Analysis (GSA) is performed using the `gsa`

function. This function's signature is:

`GlobalSensitivity.gsa`

— Functionfunction GlobalSensitivity.gsa( m::PumasModel, pop::Population, params::NamedTuple, method::GlobalSensitivity.GSAMethod, vars = [:dv], p*range*low = NamedTuple(), p*range*high = NamedTuple(); constantcoef::NTuple{N,Symbol} = (), rng::AbstractRNG = default*rng(), diffeq*options::NamedTuple = NamedTuple(), N = nothing, n = nothing, samples = 1000, kwargs..., )

Function to perform global sensitivty analysis

The arguments are:

`model`

: a`PumasModel`

, either defined by the`@model`

DSL or the function-based interface.`population`

: a`Population`

.`params`

: a named tuple of parameters.`method`

: one of the`GSAMethod`

s from GlobalSensitivity.jl,`Sobol()`

,`Morris()`

,`eFAST()`

,`RegressionGSA()`

.`vars`

: a list of the derived variables to run GSA on.`p_range_low`

&`p_range_high`

: the lower and upper bounds for the parameters you want to run the GSA on, if not specified the bounds from`@param`

block are used.

Keyword arguments are:

`constantcoef`

: The parameters that are not to be varied in the GSA, passed as a Tuple of Symbols.`rng`

: The random number generator to use.`samples`

: The number of samples to use for the GSA.`diffeq_options`

: The options to pass to the differential equation solver, passed on to the`simobs`

called inside`gsa`

.

For method specific arguments that are passed with the method constructor you can refer to the GlobalSensitivity.jl documentation.

The `gsa`

function provided in Pumas assumes that you want to run GSA on all the parameters of the model and also constrains you to run GSA only on variables in the `@derived`

block. For more control on the input and output you can create a custom function and use the `gsa`

function from the `GlobalSensitivity`

package which is callable on any Julia function directly.