sat_modcomp | R Documentation |
An approximate F-test based on the Satterthwaite approach.
SATmodcomp(
largeModel,
smallModel,
betaH = 0,
details = 0,
eps = sqrt(.Machine$double.eps)
)
## S3 method for class 'lmerMod'
SATmodcomp(
largeModel,
smallModel,
betaH = 0,
details = 0,
eps = sqrt(.Machine$double.eps)
)
largeModel |
An |
smallModel |
An |
betaH |
A number or a vector of the beta of the hypothesis,
e.g. L beta=L betaH. If |
details |
If larger than 0 some timing details are printed. |
eps |
A small number. |
Notice: It cannot be guaranteed that the results agree with other implementations of the Satterthwaite approach!
Søren Højsgaard, sorenh@math.aau.dk
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/
getKR
, lmer
, vcovAdj
,
PBmodcomp
, KRmodcomp
(fm0 <- lmer(Reaction ~ (Days|Subject), sleepstudy))
(fm1 <- lmer(Reaction ~ Days + (Days|Subject), sleepstudy))
(fm2 <- lmer(Reaction ~ Days + I(Days^2) + (Days|Subject), sleepstudy))
## Test for no effect of Days in fm1, i.e. test fm0 under fm1
SATmodcomp(fm1, "Days")
SATmodcomp(fm1, ~.-Days)
L1 <- cbind(0, 1)
SATmodcomp(fm1, L1)
SATmodcomp(fm1, fm0)
anova(fm1, fm0)
## Test for no effect of Days and Days-squared in fm2, i.e. test fm0 under fm2
SATmodcomp(fm2, "(Days+I(Days^2))")
SATmodcomp(fm2, ~. - Days - I(Days^2))
L2 <- rbind(c(0, 1, 0), c(0, 0, 1))
SATmodcomp(fm2, L2)
SATmodcomp(fm2, fm0)
anova(fm2, fm0)
## Test for no effect of Days-squared in fm2, i.e. test fm1 under fm2
SATmodcomp(fm2, "I(Days^2)")
SATmodcomp(fm2, ~. - I(Days^2))
L3 <- rbind(c(0, 0, 1))
SATmodcomp(fm2, L3)
SATmodcomp(fm2, fm1)
anova(fm2, fm1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.