# Sobol Sensitivity Analysis

I want to use Sobol SA with Sobol sampling to find the most influential parameters on the energy consumption of a pilot building. I have 40 input variables (building characteristics) that some have uniform and some normal distributions.

For Sobol sampling I know the total cost for the first order and total order estimation is N(k+2), how can I choose the sampling size (N)?

Is grouping actually helpful for 40 parameters?

So I also thought of first running a first order and second order SA and based on the results of second-order indices, I group my input variables. But I do not know if that is actually helpful cause my main intention is to simplify the simulation.

Note also that there are multiple methods to estimate Sobol indices. See the R library sensitivity for a list of lots of them. In particular, sobolEff function implements a very effective one based on Janon et al. (2014).