[R-sig-ME] Use of pbkrtest to calculate Kenward-Roger approximated degrees of freedom
Joshua Rosenberg
jmichaelrosenberg at gmail.com
Thu Dec 21 15:51:43 CET 2017
Hi everyone,
I'm trying to use the pbkrtest package to calculate Kenward-Roger
approximation degrees of freedom for fixed effects coefficients estimated
using the lmer() function from the lme4 package.
I've been able to use, for example, the function pbkrtest::get_Lb_ddf().
Here is how I am using it:
library(lme4)
library(pbkrtest)
fm1 <- lmer(Reaction ~ Days + (Days| Subject), sleepstudy)
get_Lb_ddf(fm1, lme4::fixef(fm1))
My understanding is that this function returns the "denominator degrees of
freedom," which, if I understand correctly, apply to the *overall model*,
rather to specific coefficients, in part because get_Lb_ddf() returns a
single value whether there are coefficients associated with zero, one, or
more than one predictors. I
'm sorry if this is a novice question with respect to calculating degrees
of freedom in general (and calculating them with this, Kenward-Roger,
approach)! Thanks for any thoughts or suggestions for how to think about
calculating degrees of freedom using this - or another, better - approach.
Josh
--
Joshua Rosenberg, Ph.D. Candidate
Educational Psychology
&
Educational Technology
Michigan State University
http://jmichaelrosenberg.com
[[alternative HTML version deleted]]
More information about the R-sig-mixed-models
mailing list