Open
Description
At the moment, calculating marginal effects for several subjects, channels, predictors etc. is rather time-consuming.
I think it would be worth checking whether there is optimization potential for the effects
function.
Example: Computing the marginal effects for one subject with an Unfold model with 128 channels, 2 basis functions and specifying one predictor with 3 levels (with 9 predictor variables in total in the model), took about 99.4 seconds.
This does not scale well if one has 20-30 subjects and more predictor values.