R: F-test based on the Satterthwaite's approximation for...

calcSatterth {lmerTest} | R Documentation

## F-test based on the Satterthwaite's approximation for denominator degrees of freedom.

### Description

Produces a list with the values for an approximate F-test based on the Satterthwaite's approximation.

### Usage

    calcSatterth(model, L)

### Arguments

`model` | linear mixed effects model (lmer object).
`L` | hypothesis contrast matrix or a vector
`...` | other potential arguments.

### Details

F test for the null hypothesis H_0: L β = 0, where β is a vector of the same length as `fixef(model)`

### Value

A list with the results from the F test

`denom` | numeric. Denominator degrees of freedom, calculated with the Satterthwaite's approximation
`Fstat` | numeric. F statistic
`pvalue` | numeric. p-value of the corresponding F test
`ndf` | numeric. Numerator degrees of freedom

### Author(s)

Alexandra Kuznetsova, Per Bruun Brockhoff, Rune Haubo Bojesen Christensen

### References

Schaalje G.B., McBride J.B., Fellingham G.W. 2002 Adequacy of approximations to distributions of test Statistics in complex mixed linear models

### See Also

`anova`

### Examples

    ## import lme4 package and lmerTest package
    library(lmerTest)

    ## specify lmer model for the sleepstudy data from the lme4 package
    m <- lmer(Reaction ~ Days + (1 + Days|Subject), sleepstudy)

    L <- cbind(0,1) ## specify contrast vector
    calcSatterth(m, L) ## calculate F test

    ## specify model for the ham data
    m.ham <- lmer(Informed.liking ~ Product + (1|Consumer), data = ham)

    ## specify contrast vector for testing product effect
    L <- matrix(0, ncol = 4, nrow = 3)
    L[1,2] <- L[2,3] <- L[3,4] <- 1
    calcSatterth(m.ham, L)

    ## by using anova function we get the same result
    anova(m.ham)

[Package lmerTest version 2.0-33 Index]