Learn R Programming

pbkrtest (version 0.5.5)

get_modcomp: Extract (or "get") components from a KRmodcomp or SATmodcomp object.

Description

Extract (or "get") components from a KRmodcomp or SATmodcomp object. In particular, get denominator degrees of freedom.

Usage

getKR(
  object,
  name = c("ndf", "ddf", "Fstat", "p.value", "F.scaling", "FstatU", "p.valueU", "aux")
)

getSAT(object, name = c("ndf", "ddf", "Fstat", "p.value"))

Arguments

object

A KRmodcomp object, which is the result of the KRmodcomp function

name

The available slots. If name is missing or NULL then everything is returned.

Author

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, PBmodcomp, vcovAdj

Examples

Run this code

(fm0 <- lmer(Reaction ~ (Days|Subject), sleepstudy))
(fm1 <- lmer(Reaction ~ Days + (Days|Subject), sleepstudy))
(fm2 <- lmer(Reaction ~ Days + I(Days^2) + (Days|Subject), sleepstudy))

x10 <- KRmodcomp(fm1, fm0)
getKR(x10, "ddf")

KRmodcomp(fm1, fm0) |> getKR("ddf")
KRmodcomp(fm2, fm0) |> getKR("ddf")
KRmodcomp(fm2, fm1) |> getKR("ddf")

## For comparison:

SATmodcomp(fm1, fm0) |> getSAT("ddf")
SATmodcomp(fm2, fm0) |> getSAT("ddf")
SATmodcomp(fm2, fm1) |> getSAT("ddf")

Run the code above in your browser using DataLab