Marginal Effect on UQlab


I Build my PCE model using the functionality in UQlab. I would like to ask if it possible to calculate my parameters’ marginal effect with respect to the response. The Marginal effect of a specific parameter represents the variability of the model output to this parameter when other parameters
are kept constant at their average values.

Hi @sahuqa ,

Do you want to compute a number or a univariate function for the marginal effect? If you want a number, maybe you could have a look at the different options for sensitivity analysis in UQLab.
If you want a univariate function, what about defining a function handle evaluating your PCE at the mean values like this:

marginal_effect_1 = @(x1) uq_evalModel(myPCE, [x1, repmat(mean2, size(x1)), repmat(mean3, size(x1)), ...]);

where mean2, mean3 … are the mean values of the second, third, … parameter, and myPCE is the PCE that you computed.

Let us know which method you chose to compute the marginal effects! Feel free to share your code so that other users can benefit from it.