# How to do Sobol sensitivity analysis for existing datasets

**URL:** <https://uqworld.org/t/how-to-do-sobol-sensitivity-analysis-for-existing-datasets/4054>\
**Category:** UQ Discussion Forum\
**Tags:** sensitivity, sobol, uqlab\
**Created:** [April 24, 2025, 11:16am UTC](https://uqworld.org/t/how-to-do-sobol-sensitivity-analysis-for-existing-datasets/4054 "2025-04-24T11:16:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![saeid\_saberi](https://uqworld.org/user_avatar/uqworld.org/saeid_saberi/32/1847_2.png) [@saeid\_saberi](https://uqworld.org/u/saeid_saberi)\
**Post date:** [April 24, 2025, 11:16am UTC](https://uqworld.org/t/how-to-do-sobol-sensitivity-analysis-for-existing-datasets/4054/1 "2025-04-24T11:16:29Z")

</div>

I’ve extracted datasets from experiments and want to perform a sensitivity analysis using UQLab. However, I couldn’t find any documentation on how to directly apply sensitivity analysis to raw data. From what I’ve seen, UQLab typically requires defining a model (i.e., a function) and then evaluating that function to generate the necessary data.

Is there a way to perform sensitivity analysis in UQLab using existing datasets, without explicitly defining a function? Any advice or suggestions would be appreciated!

---

<div class="post-metadata">

**Author:** ![styfen.schaer](https://uqworld.org/user_avatar/uqworld.org/styfen.schaer/32/849_2.png) [@styfen.schaer](https://uqworld.org/u/styfen.schaer)\
**Post date:** [April 29, 2025, 1:53pm UTC](https://uqworld.org/t/how-to-do-sobol-sensitivity-analysis-for-existing-datasets/4054/2 "2025-04-29T13:53:52Z")

</div>

Dear @saeid_saberi,

You cannot directly apply Sobol’ sensitivity analysis to an existing dataset without an underlying model. However, you can construct a Polynomial Chaos Expansion (PCE) surrogate based on your experimental design and compute Sobol’ indices from the PCE (see PCE-based Sobol’ indices in the [manual](https://www.uqlab.com/sensitivity-user-manual)). This approach is especially handy when working with small datasets, as it typically gives better results than the MC-based approach.

Hope this helps!

Best regards,  
Styfen

---

<div class="post-metadata">

**Author:** ![saeid\_saberi](https://uqworld.org/user_avatar/uqworld.org/saeid_saberi/32/1847_2.png) [@saeid\_saberi](https://uqworld.org/u/saeid_saberi)\
**Post date:** [May 5, 2025, 7:56am UTC](https://uqworld.org/t/how-to-do-sobol-sensitivity-analysis-for-existing-datasets/4054/3 "2025-05-05T07:56:29Z")

</div>

Dear Styfen,

Thank you for the information. Actually, I’ve used AI-based methods, but I’ll try PCE-based Sobol as well.

Best

---

<div class="post-metadata">

**Author:** ![Michael\_Baudin](https://uqworld.org/user_avatar/uqworld.org/michael_baudin/32/425_2.png) [@Michael\_Baudin](https://uqworld.org/u/Michael_Baudin)\
**Post date:** [October 29, 2025, 6:01pm UTC](https://uqworld.org/t/how-to-do-sobol-sensitivity-analysis-for-existing-datasets/4054/4 "2025-10-29T18:01:38Z")

</div>

Dear @saeid_saberi ,

The approach suggested by @styfen.schaer is perfectly fine and I would personnaly use this way. There are, however, other methods to do this. One of these is to use estimators based on rank statistics, see (Gamboa, Gremaud, Klein & Lagnoux, 2022). An example is provided at [plot\_sensitivity\_rank\_sobol.html](https://openturns.github.io/openturns/latest/auto_reliability_sensitivity/sensitivity_analysis/plot_sensitivity_rank_sobol.html).

Best regards,  
Michaël

- Gamboa, F., Gremaud, P., Klein, T. & Lagnoux, A. _Global sensitivity analysis: A novel generation of mighty estimators based on rank statistics_ Bernoulli 28(4): 2345-2374, 2022. **[pdf](https://hal.science/hal-02474902v4/file/New_Look_Bernoulli_4.pdf)**
