[R-sig-ME] extract DFs from summary.merModLmerTest

Ben Bolker bbolker at gmail.com
Wed Nov 20 23:37:25 CET 2013


On 13-11-20 05:27 PM, Jake Westfall wrote:
> I see that package lmerTest will compute approximate degrees of
> freedom via the Satterthwaite method for test of fixed effects from
> merMod objects, and it uses these to provide some p-values. Great.
> But how do I extract the computed Satterthwaite degrees of freedom?
> They are not displayed in the default output of
> summary.merModLmerTest objects (which is a big "WTF" in itself, but
> nevermind), not discussed in the package documentation as far as I
> can tell, and studying str(summary(fittedModel)) has not given any
> clues about where they are stored... surely they must be saved
> somewhere, right??
> 

 They don't *have* to be stored (although I agree it would be a good
idea); they might be computed on the fly and used for computing the
p-values, or even printed out, but not stored in the summary object.
  You might have to start digging through

getMethod("summary","merModLmerTest") and
lmerTest:::totalAnovaRandLsmeans

but these are pretty scary pieces of code.  Maybe send a wishlist item
to the maintainer ... ?



More information about the R-sig-mixed-models mailing list