Sensitivity with correlated inputs

Hi there,

I am trying to compute the ANCOVA sensitivity indices using UQlab.
In my problem, I have correlated inputs, and the input dimension is M=20. My output is also dynamic, meaning I have different time instances. But for now, I will consider N_{out} = 1 for simplicity. I collected the data from a computational study of one colleague of mine. Therefore, I do not possess the model for the computation of more samples. I got my list of input and output with sample size N_s = 800.

If I understood correctly, the ANCOVA analysis needs the input and output domain characteristics (not the samples), the model, and the sample size to compute the PCE. If correct, can I perform an ANCOVA without the model definition? I try to run it without the model definition, but I keep getting the same error:

Error: There is no MODEL provided!
While initializing the analysis
Error in uq_initialize_uq_sensitivity (line 730)
                error('While initializing the analysis');

I paste here part of the code from which I get the error:

%% loading the data
% input files
inputMatrix= load('FE_Results_23-XP005-V7-inputData1.csv');
% output files
output_sim = load('FE_Results_23-XP005-V7-output.csv');

%% Input module
ModelOpts.Marginals(1).Type = 'Uniform';
ModelOpts.Marginals(1).Parameters = [22.99, 24.00];
ModelOpts.Marginals(2).Type = 'Beta';
ModelOpts.Marginals(2).Parameters = [1268.35, 1270.81];
ModelOpts.Marginals(3).Type = 'Logistic';

% Dependence
ModelOpts.Copula.Type = 'Gaussian';
ModelOpts.Copula.Parameters = [1, 0.0099, -0.0042, 0.05...] % 20 times 20 array

myInput = uq_createInput(ModelOpts);

%% ANCOVA sensitivity indices
ANCOVASensOpts.Type = 'Sensitivity';
ANCOVASensOpts.Method = 'ANCOVA';

ANCOVASensOpts.ANCOVA.Samples.X = inputMatrix;
ANCOVASensOpts.ANCOVA.Samples.Y = output_sim;

ANCOVAAnalysis = uq_createAnalysis(ANCOVASensOpts);

I also tried to compute a PCE surrogate from my data (input and output) and use it as a model for the ANCOVA. In this case, I do not get the error I mentioned above. However, I am not sure that this approach really makes sense.

Thank you for reading this far, and for any help you can provide


Hi @giansteve

Can you provide a minimal reproducible example, i.e. fill in the missing part in your script and add data? It doesn’t have to be the real data, dummy data is fine.

Best regards

Hi @styfen.schaer,

thank you for your message.
Here you can find the zip file with the Matlab file and input and output data. I trimmed the input and output space to make their dummy versions. The problem is still the same. (48.0 KB)

Thank you in advance :blush:

Hi @giansteve

Is it possible that you have uploaded the wrong file? To me, it looks like main_SA_v3.m is trying to load the real data from an absolute path from your machine. The dummy input also has fewer dimensions than the one specified in the script. :slight_smile:

Oplá, sorry. I updated the wrong file in the zip folder, “it never happened to me” :rofl:
I modified the uploaded file in the message above. It should be fine now.

Hello @giansteve

Thanks for the updated data and script, I can now reproduce the error. It is indeed a bug in UQLab. The fix is very simple. Enter edit uq_initialize_uq_sensitivity.m and update the if statement in line 728 from:

if isempty(Internal.Model)


if isempty(Internal.Model) && SamplesEmpty

If you run it with the dummy data, you will see another error. However, this one is related to the dummy data where one of the outputs is constant.

In any case, thanks for reporting this!

1 Like

Hi @styfen.schaer ,

thank you so much for this :blush: