Skip to main content
Version: 🚧 Alpha 🚧

6. Sobol Sensitivity Analysis

Morris provides a screening summary of parameter effects. Sobol estimates first-order and total-order contributions to output variance, including contributions associated with interactions between parameters.

In particular, this step presents:

  • The first-order and total-order indices shown in the report
  • The Saltelli sampling scheme and how to calculate the total number of runs
  • How to declare method sobol and configure its facets
  • How to read and interpret the report file produced by GAMA

The model file for this step can be found in: Tutorials/SIR Analysis/models/SIR_sobol.gaml


How Sobol works​

Sobol is a variance-based global sensitivity analysis method. It estimates contributions to output variance for each parameter and its interactions:

IndexMeaning
S1First-order index: fraction of output variance explained by Xi alone, ignoring all interactions. For exact indices, their sum is at most 1; finite-sample estimates can depart from this bound.
STTotal-order index: fraction explained by Xi including all interactions involving Xi. The total-order estimate is expected to be at least as large as the first-order estimate; finite-sample estimates may differ.

Three diagnostic rules:

  • ST close to S1 → the estimates show little difference between the total-order and first-order contributions.
  • ST greater than S1 → the difference can indicate contribution through interactions involving that parameter.
  • Low ST → the estimate indicates a small contribution to output variance within the configured parameter ranges.

Interpret these estimates with their reported uncertainty and the ranges used for the analysis. They do not establish that a parameter can be fixed outside those ranges.


The Saltelli sampling scheme​

The implementation uses Saltelli sampling. For k parameters and sample base points, the experiment generates sample × (2k + 2) runs:

total runs = sample × (2k + 2)

The model sets sample: 20 with k = 5 parameters. Using the run-count formula shown above gives 20 × (2 × 5 + 2) = 240 runs.

The checked-in model sets sample: 20. This setting is useful for demonstrating the model configuration; assess whether a larger sample is needed for the analysis and account for the corresponding increase in simulation runs.


Morris vs Sobol​

MorrisSobol
Costr × (k+1)N × (2k+2)
Indicesμ, μ*, σS1, ST
InteractionsDetected via σ (qualitative)Quantified via ST
Best forScreening - many parametersQuantification - fewer parameters

A Morris screening can help select parameters for a later Sobol analysis. Review the model assumptions and parameter ranges before excluding parameters.


The method sobol statement​

The model sets sample: 20 and writes the report as CSV to ../results/sobol_report.csv; raw run data goes to ../results/sobol_raw.csv. The facets used in the experiment are:

  • outputs: - list of global variables to analyse. Mandatory.
  • sample: - N in the Saltelli scheme. Total runs = N × (2k+2). Mandatory.
  • report: - path to the output file. This model uses a .csv report.
  • results: - path to the raw CSV with one row per run. Optional but recommended.
method sobol
outputs: ["nb_recovered"]
sample: 20
report: "../results/sobol_report.csv"
results: "../results/sobol_raw.csv";

Reading the report​

The report uses CSV columns for the output, parameter, first-order estimate and confidence, and total-order estimate and confidence. Interpret the values and uncertainty using the model configuration that generated the report.


Model in GAMA​

The complete runnable model is included in the SIR Analysis project: SIR_sobol.gaml.


What's next?​

Step 7 introduces Beta^d, the third and final sensitivity analysis method available in GAMA. Unlike Sobol, it does not rely on variance - it measures how much fixing a parameter shifts the entire output distribution, making it complementary to both Morris and Sobol.