Is there a way to check Sobol parameters Confidence interval (CI)?


Running sobol_sensitivity in DiffEqSensitivity gives some negative values - even while useing the equation ind documents.

function f(du,u,p,t)
  du[1] = p[1]*u[1] - p[2]*u[1]*u[2]
  du[2] = -3*u[2] + u[1]*u[2]
u0 = [1.0;1.0]
tspan = (0.0,10.0)
p = [1.5,1.0]
prob = ODEProblem(f,u0,tspan,p)
t = collect(range(0, stop=10, length=200))

s0 = sobol_sensitivity(prob,Tsit5(),t,[[1,5],[0.5,5]],N,0)
Out[8]: 2-element Array{Array{Float64,2},1}:
 [NaN 0.507831 … 1.00731 1.00436; NaN 1.92336 … 0.732384 0.730945]
 [NaN 0.47214 … 0.676224 0.681525; NaN -1.68656 … 0.879557 0.877603]

s1 = sobol_sensitivity(prob,Tsit5(),t,[[1,5],[0.5,5]],N,1)
Out[9]: 2-element Array{Array{Float64,2},1}:
 [NaN 0.39537 … 0.341697 0.343645; NaN -2.06101 … 0.10922 0.106976]
 [NaN 0.652815 … 0.00910675 0.00815206; NaN 5.24832 … 0.296978 0.296639]

s2 = sobol_sensitivity(prob,Tsit5(),t,[[1,5],[0.5,5]],N,2)
Out[10]: 1-element Array{Array{Float64,2},1}:
 [NaN -0.0596478 … 0.652303 0.657847; NaN -1.84504 … 0.645139 0.620036]

for example -0.0596478 in second element of last list.

Is there anyway to check the CI or stdev of the index (not clear form documentation) to see if 0 is included in the index CI - This would be useful to determine if should assume the value of the index to be zero or if I have to rerun the sensitivity analysis with a higher N.



@alewolf unfortunately we don’t have any functionality for this yet. We can discuss adding this though, could you open an issue for this?

The negative values do look wrong. I’ll take a look at this, we can move the conversation to the repo I guess that would be easier.

Thanks for the quick reply!

I’ll open the issue-



Did you open that issue? If so, could you reference it here please?

I’m also interested in getting a confidence interval for the Sobol indices.

@agimenezromero we support CIs now

1 Like

Awesome! But how does it work? I mean, how can I obtain the CI for each index? I can’t find it…

Sorry for so many questions :s

In the call to run sobol for example sobol_result = gsa(f1,Sobol(),A,B) you can specify nboot which is the number of bootstrap samples and conf_int for the confidence interval level (defaults to 0.95) as sobol_result = gsa(f1,Sobol(nboot = 100, conf_int = 0.75),A,B) and then the output struct contains the fields for the confidence intervals for the first, second and total order indices similar to the indices

OK, thank you very much!