[R-sig-ME] Use of pbkrtest to calculate Kenward-Roger approximation degrees of freedom

Joshua Rosenberg jrosen at msu.edu
Wed Dec 20 23:10:11 CET 2017


Hi R-sig-mixed-models,

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).

Any advice pointing me in the right direction is much appreciated.

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