Description Usage Arguments Details Value Author(s) References See Also Examples
Produces a list with the values for an approximate F-test based on the Satterthwaite's approximation.
1 | calcSatterth(model, L)
|
model |
linear mixed effects model (lmer object). |
L |
hypothesis contrast matrix or a vector |
... |
other potential arguments. |
F test for the null hypothesis H_0: L β
= 0, where β is a vector of the same length as
fixef(model)
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 |
Alexandra Kuznetsova, Per Bruun Brockhoff, Rune Haubo Bojesen Christensen
Schaalje G.B., McBride J.B., Fellingham G.W. 2002 Adequacy of approximations to distributions of test Statistics in complex mixed linear models
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ## 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.