Mark Difford <mark_difford <at> yahoo.co.uk> writes:

> Briefly, y ~ x1 * x2 expands to y ~ x1 + x2 + x1:x2, where the last term
> (interaction term) amounts to a test of slope. Normally you would read its
> significance from F/chisq/p-value. Many practitioners consider the L.Ratio
> test to be a better option. For the fixed effects part in lmer() do:
> 
> mod1 <- y ~ x1 + x2  == y ~ x1 + x2
> mod2 <- y ~ x1 * x2  == y ~ x1 + x2 + x1:x2
> 
> anova(mod1, mod2)
> 
> This will tell you if you need to worry about interaction or whether slopes
> are parallel.

  ... except that you'd better hope that you have a large number
of random units (years? I forget now), or the LR test will be
unreliable -- see Pinheiro and Bates 2000, and refer further questions
to the r-sig-mixed-models list ...

  cheers
    Ben Bolker

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to