Closed bwiernik closed 4 months ago
One possible quick fix here would be to pass already-computed distributions as a list to each internal all, so that we re-estimate them only conditionally
Where is the model refit multiple times? I think, the null-model is only computed once and pass as argument inside .compute_variances()
(at least for the latest insight version).
Did you try running the example? When it starts to compute .variance_distributional(), get_sigma() drops it back into the a new iteration of compute_variance(), which computes the null model again. I stopped the function, but it refits something at least 30 times before I stopped it.
Thanks!
The sequence of internal function to compute distribution and residual variance loops back into
.compute_variances()
seemingly endlessly. (Maybe not endlessly, but we are re-estimating the same updated models to get "null" models and "sigma" variance many many times as the functions loop back through the parentcompute_variances()
function.) We should adjust this function to ensure we only resample each updated model 1 time.