Computing Sobol Sensitivity Indexes
Mostra commenti meno recenti
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
Risposte (1)
Miguel Headley
il 10 Lug 2016
0 voti
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 Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

