How to interpret 2nd order Sobol global sensitivity analysis result?

Hey All,

I used DiffeqSensitivity’s global sensitivity analysis using the Sobol method in order to explain the influence of specific input parameters of a model I’m building. I’m already getting some exciting results from the first order indices, and am also interested in the second order effects.
I am however unsure how to interpret the second order results.
My model has 35 input variables and 4 output variables. The resulting second order indices matrix has a size of 595 x 4.
How do I know which indexes in the second order indices matrix correspond to the interaction between two input variables?

@Vaibhavdixit02 might want to comment here.

@Janssena the second order indices proceed as 1-2, 1-3, 1-4...1-n, 2-3, 2-4,...2-n... i.e. for each parameter starting from the first we take the combination of that parameter with all subsequent parameters. This leads to 35 \choose 2 total combinations which is 595. I hope this clarifies it?

@Vaibhavdixit02 food for thought: reshape and display it as a matrix?

Hmm, not sure what the reshape should be? Currently it is stored as rows for dependent variables with the sensitivity for that variable due to the parameter (or combination of parameters in second order) as the columns indexed as per the order they are passed in. I think the op might have the dimensions for their output mentioned the other way round (I checked to ensure I remembered correctly)

1 Like

That is exaclty what I meant yeah! Shape indeed is 4×595. I think it would be most clear if you have a input x input matrix per output variable. That makes it easy to look at all interactions for each input variable and can immediately be visualized using something like a heatmap.

If you want to take a look at using heat map with the gsa output there is an example, it differs a bit since the dispatch for gsa in Pumas returns a separate struct but it should hopefully give you enough hint to work it out. You can ping me if you get stuck.