## Reproducing an example from the doc of lmerTest::contest.lmerModLmerTest,
# using a spaMM fit as input.
if (FALSE) {
data("sleepstudy", package="lme4")
## The fit:
spfit <- fitme(Reaction ~ Days + I(Days^2) + (1|Subject) + (0+Days|Subject),
sleepstudy, method="REML")
## Conversion:
spfit_lmlt <- as_LMLT(spfit)
## Functions from package lmerTest can then be called on this object:
lmerTest::contest(spfit_lmlt, L=diag(3)[2:3, ]) # Test of 'Days + I(Days^2)'.
#
anova(spfit_lmlt, type="1") # : using lmerTest:::anova.lmerModLmerTest()
drop1(spfit_lmlt) # : using lmerTest:::drop1.lmerModLmerTest()
}
Run the code above in your browser using DataLab