MixedModels.jl icon indicating copy to clipboard operation
MixedModels.jl copied to clipboard

Adds docs page on denominator degrees of freedom

Open palday opened this issue 4 years ago • 4 comments

This is discussed in lots of places elsewhere, but maybe we can consolidate our take and our priorities into a page like the one for rank deficiency.

palday avatar Jun 24 '21 04:06 palday

On a related issue, I have been looking at the method for leverage in src/mixedmodels.jl. As stated in the comments, this is a very inefficient way of determining these values. It uses existing code but at the expense of doing the same calculation over and over again. It calls updateL to re-evaluate the entire L blocked matrix even though the only part that changes for each observation is the last row of L. I have some time now and will work on obtaining these values without all the redundant computation so that we can use "trace of the hat matrix" in degrees of freedom calculations. As it stands it takes 160 seconds on my laptop even with MKL to evaluate the leverage for the "full" more fit to the :mrk17_exp1 data.

dmbates avatar Aug 15 '21 18:08 dmbates

The good news is that there is low-hanging fruit for speeding up evaluation of the leverage values. I'll start on that today but it may take a few days.

dmbates avatar Aug 16 '21 17:08 dmbates

Will #545 help with this?

palday avatar Aug 16 '21 17:08 palday

I think the formulation in terms of elementary operations using the blocks themselves is sufficiently straightforward to implement. Each leverage value uses only one diagonal block from m.L[1] in the vector-valued case and that is the big savings. There is no need to deal with the entire block in the first column of blocks. That, by itself, is enough to give substantial time savings.

dmbates avatar Aug 16 '21 17:08 dmbates