# Sensitivity analysis of Principal Component coefficients

**URL:** <https://uqworld.org/t/sensitivity-analysis-of-principal-component-coefficients/1086>\
**Category:** Community Q&A and How To\
**Tags:** sensitivity\
**Created:** [March 17, 2021, 4:59pm UTC](https://uqworld.org/t/sensitivity-analysis-of-principal-component-coefficients/1086 "2021-03-17T16:59:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![EFerreira](https://uqworld.org/letter_avatar_proxy/v4/letter/e/85f322/32.png) [@EFerreira](https://uqworld.org/u/EFerreira)\
**Post date:** [March 17, 2021, 4:59pm UTC](https://uqworld.org/t/sensitivity-analysis-of-principal-component-coefficients/1086/1 "2021-03-17T16:59:17Z")

</div>

Hi All,

Thank you for provide UQLab. 🙂

I am using real data and through pca routine from Matlab I have retain 2 principal components and I have 8 variables. For example, one equation maybe: Y1=aX1+bX2+…hX8.  
Now, I would like to perform sensitivity analysis for each equation. However, I am not able to do it using UQLab . Can somebody help me?

Best regards,

EFerreira

---

<div class="post-metadata">

**Author:** ![paulremo](https://uqworld.org/user_avatar/uqworld.org/paulremo/32/192_2.png) [@paulremo](https://uqworld.org/u/paulremo)\
**Post date:** [March 23, 2021, 5:04pm UTC](https://uqworld.org/t/sensitivity-analysis-of-principal-component-coefficients/1086/2 "2021-03-23T17:04:40Z")

</div>

Hi @EFerreira

It is quite hard to understand where exactly your issue is. Could you possibly elaborate a bit, or ideally share a minimal working example?

---

<div class="post-metadata">

**Author:** ![EFerreira](https://uqworld.org/letter_avatar_proxy/v4/letter/e/85f322/32.png) [@EFerreira](https://uqworld.org/u/EFerreira)\
**Post date:** [March 23, 2021, 5:40pm UTC](https://uqworld.org/t/sensitivity-analysis-of-principal-component-coefficients/1086/3 "2021-03-23T17:40:50Z")

</div>

Hi @paulremo

Thank you once again for your support.

In the following zip folder, I have put all the files for a short example of what I have done.  
pca\_analysis is the main file to run. It calls 3 input files and merge them, then I perform Principal Component Analysis for this complete database.  
The results are displayed in PCA-output.txt  
At the end, I open it and start to see what is the percentagem of total explained variability retaining only 2 components, because I only want to display the results in 2D plot. Then retaining the first two columns of loadings I am able to write the model equations.  
For example:  
Y1=0.4385_var1+0.3980_var2+0.3389_var3+0.0890_var4+0.4887_var5+0.4513_var6+0.2898\*var7  
A reviewer kindly suggest me that it would be very interesting to perform Sobol’s indices analysis to the dataset.  
It is a completly new area of knowledge for me and through my understanting I think I have to perform global sensitivity of the indices of PC1 and PC2 for each analysis. Maybe, I am wrong. Still I was not able to do it.

I hope I could explain my issue.

Sincerely,

EFerreira

[example\_PCA\_files.zip](https://uqworld.org/uploads/short-url/oXINkKj3aJAnPYDoB3yv0QKdkkC.zip) (5.7 KB)
