get_ddf_Lb {pbkrtest} | R Documentation |
Adjusted denominator degrees of freedom for linear estimate for linear mixed model.
Description
Get adjusted denominator degrees freedom for testing Lb=0 in a linear mixed model where L is a restriction matrix.
Usage
get_Lb_ddf(object, L)
## S3 method for class 'lmerMod'
get_Lb_ddf(object, L)
get_ddf_Lb(object, Lcoef)
## S3 method for class 'lmerMod'
get_ddf_Lb(object, Lcoef)
Lb_ddf(L, V0, Vadj)
ddf_Lb(VVa, Lcoef, VV0 = VVa)
Arguments
object |
A linear mixed model object. |
L |
A vector with the same length as |
Lcoef |
Linear contrast matrix |
V0 , Vadj |
The unadjusted and the adjusted covariance matrices for the fixed
effects parameters. The unadjusted covariance matrix is obtained with
|
VVa |
Adjusted covariance matrix |
VV0 |
Unadjusted covariance matrix |
Value
Adjusted degrees of freedom (adjustment made by a Kenward-Roger approximation).
Author(s)
Søren Højsgaard, sorenh@math.aau.dk
References
Ulrich Halekoh, Søren Højsgaard (2014)., A Kenward-Roger Approximation and Parametric Bootstrap Methods for Tests in Linear Mixed Models - The R Package pbkrtest., Journal of Statistical Software, 58(10), 1-30., https://www.jstatsoft.org/v59/i09/
See Also
KRmodcomp
, vcovAdj
,
model2restriction_matrix
,
restriction_matrix2model
Examples
(fmLarge <- lmer(Reaction ~ Days + (Days|Subject), sleepstudy))
## removing Days
(fmSmall <- lmer(Reaction ~ 1 + (Days|Subject), sleepstudy))
anova(fmLarge, fmSmall)
KRmodcomp(fmLarge, fmSmall) ## 17 denominator df's
get_Lb_ddf(fmLarge, c(0, 1)) ## 17 denominator df's
# Notice: The restriction matrix L corresponding to the test above
# can be found with
L <- model2restriction_matrix(fmLarge, fmSmall)
L