Sorry I'm so late to this discussion:

Tom van Dooren wrote:
>The Orthodont example in the LRTSim() help file ran perfectly well using
lme(), but not with lmer().

I'm curious about this, maybe I have to fix sth - would you be so kind and
send me your sessionInfo() and the code that didn't work out? (preferrably
off list, I guess, since this is only for debugging purposes)
More to the point, you don't have to use LRTSim() or RLRTSim() which
simulate values from the reference/null distribution of the (R)LRT -
if all you need is the observed (restricted) likelihood ratio and the
p-value for the random effect, just stick your fitted model into exactLRT()
or exactRLRT():
##
data(sleepstudy)
m <- lmer(Reaction ~ I(Days-4.5) + (1|Subject) , sleepstudy)
exactRLRT(m)
##



Tom van Dooren wrote:
>With REML=FALSE RLRsim seems to work fine in R 2.10, if I use the design
matrix and Zt as arguments in LRTSim().
>Otherwise I didn't get useful results out.
I see now that exactLRT() is broken for lme4 -  it's hard to keep up with
the changes in the structure of lme4-objects (especially since there aren't
a lot of accessor functions).
But as long as you only test presence of a random effect vs absence and no
additional hypotheses about the fixed effects, the restricted LR test in
exactRLRT() is more powerful than the LR test.

Summing up: If all you need is the p-value, don't bother with LRTSim() or
RLRTSim(), just use the wrappers exactRLRT()/exactLRT().

	[[alternative HTML version deleted]]


