get_ddf_Lb: Adjusted denomintor degress freedom for linear estimate for...

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/get_ddf_Lb.R

Description

Get adjusted denomintor degress freedom for testing Lb=0 in a linear mixed model where L is a restriction matrix.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
get_Lb_ddf(object, L)

## S3 method for class 'lmerMod'
get_Lb_ddf(object, L)

Lb_ddf(L, V0, Vadj)

get_ddf_Lb(object, Lcoef)

## S3 method for class 'lmerMod'
get_ddf_Lb(object, Lcoef)

ddf_Lb(VVa, Lcoef, VV0 = VVa)

Arguments

object

A linear mixed model object.

L

A vector with the same length as fixef(object) or a matrix with the same number of columns as the length of fixef(object)

V0, Vadj

Unadjusted and adjusted covariance matrix for the fixed effects parameters. Undjusted covariance matrix is obtained with vcov() and adjusted with vcovAdj().

Lcoef

Linear contrast matrix

VVa

Adjusted covariance matrix

VV0

Unadjusted covariance matrix

Value

Adjusted degrees of freedom (adjusment made by a Kenward-Roger approximation).

Author(s)

Søren Højsgaard, [email protected]

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., http://www.jstatsoft.org/v59/i09/

See Also

KRmodcomp, vcovAdj, model2restrictionMatrix, restrictionMatrix2model

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
(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 <- model2restrictionMatrix(fmLarge, fmSmall)
L

hojsgaard/pbkrtest documentation built on June 30, 2018, 4:04 a.m.