Computing Sobol Sensitivity Indexes

8 visualizzazioni (ultimi 30 giorni)
Albert
Albert il 15 Ott 2013
Risposto: Miguel Headley il 10 Lug 2016
Hello,
Any help in how to compute (simplest way possible) Sobol sensitivity indexes by way of variance? So far I have the following code that attempts to compute sensitivity indexes based of the inputs AlphaValues and Safety Stock on the response Total (7 columns worth). Any help is greatly appreciated. So far all I can tell is that this code is computing the total sensitivity (inclusive of the interaction term). What I am trying to get is the first order sensitivities void of the interaction term.
Thanks
N=11; %numnber of instances where a variance needs to be calculated for Safety stock (i.e. the number of levels in alpha
M=21; % number of levels in safety stock
O=10; % number of levels in demand autocorrelation values
MatrixI=[-100:10:100]; %this needs to be consistent with the levels used for the safety stock in the experiment
SofSafetyStock=ones(11,7);
SofAlphaValues=ones(21,7);
for j=4:O
k=j-3;
for i=1:N %for loop that calculates the variance across all sets
SofSafetyStock(i,k)=var(Dataset((((i-1)*21+1):((i-1)*21)+21), j));
%calculates individual variances as induced by specific variations in
%the safety stock (i.e. points at which alpha is static)
end
Stotal(k)=var(Dataset(:,j)); %total variance across all observations
MeanofS(k)=mean(SofSafetyStock(:,k)); %mean across all variances calculated in the for loop above
SfinalofSafetyStock(k)=MeanofS(k)/Stotal(k); %sensitivity index of Safety Stock on Profit only.
for i=1:M
SofAlphaValues(i, k)=var(Dataset(Dataset(:,2)==MatrixI(i), j));
%calculates individual variances as induced by specific variations in
%the alpha (i.e. points at which safety stock is static)
end
MeanofSAlpha(k)=mean(SofAlphaValues(:, k)); %averaged across all variance observations
SfinalofAlpha(k)=MeanofSAlpha(j-3)/Stotal(k); %sensitivity index for alpha on profit only
SofInteractions(k)=1-(SfinalofAlpha(k)+SfinalofSafetyStock(k)); % indicaates the remaining variance is induced by the interactions between alpha and SS
end
  1 Commento
Albert
Albert il 15 Ott 2013
Modificato: Albert il 15 Ott 2013
This is what I am trying to calculate for a dataset with the first to columns being the inputs, and columns 4-10 being the outputs.
First-order indices
A direct variance-based measure of sensitivity Si, called the "first-order sensitivity index", or "main effect index" is stated as follows,[3]
This is the contribution to the output variance of the main effect of Xi, therefore it measures the effect of varying Xi alone, but averaged over variations in other input parameters. It is standardised by the total variance to provide a fractional contribution. Higher-order interaction indices Sij, Sijk and so on can be formed by dividing other terms in the variance decomposition by Var(Y). Note that this has the implication that,

Accedi per commentare.

Risposte (1)

Miguel Headley
Miguel Headley il 10 Lug 2016
Hi Albert,
Did you manage to solve your query? If so could you explain how it was done.

Categorie

Scopri di più su Risk Management Toolbox in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by