[R] investigating interactions with mixed models
Bert Gunter
gunter.berton at gene.com
Fri Feb 23 00:33:38 CET 2007
?interaction.plot
Should help you. This works on the data, not the model. A 3-way interaction
just means that the 2-way interaction differs among the various levels of
the 3rd factor. Clever use of trellis plots (?xyplot -- especially
?panel.linejoin -- gives greater flexibility, but it requires that a steeper
learning curve be climbed).
In general, the presence of interactions is just another manifestation of
the response varying nonlinearly in the factors (**not** in the parameters,
of course -- it's a linear model after all). This is essentially always the
case, it's just a question of whether the signal/noise ratio (which depends
on sample size) is large enough to see it via P-values. So by all means look
at the plots and try to understand and interpret what's going on; but by no
means assume that p-values above and below a threshhold of .05 are a clear
guide to determining this. As usual, statistical significance and scientific
relevance are not equivalent, and the degree of overlap between the two is
often difficult to judge.
Cheers,
Bert Gunter
Genentech Nonclinical Statistics
South San Francisco, CA 94404
650-467-7374
-----Original Message-----
From: r-help-bounces at stat.math.ethz.ch
[mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Andrew Robinson
Sent: Thursday, February 22, 2007 2:32 PM
To: R. Baker
Cc: r-help at stat.math.ethz.ch
Subject: Re: [R] investigating interactions with mixed models
Hello Rachel,
I don't think that there is any infrastructure for these procedures on
lmer objects, yet. If you are willing to use lme instead, then the
multcomp package seems to provide post-hoc tests. It is worth noting
that there is some doubt as to the validity of the reference
distributions for tests of fixed effects in the presence of random
effects.
http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-are-p_002dvalues-not-displa
yed-when-using-lmer_0028_0029_003f
Cheers
Andrew
On Thu, Feb 22, 2007 at 12:32:44PM +0000, R. Baker wrote:
> I'm investigating a number of dependent variables using mixed models, e.g.
>
> data.lmer45 = lmer(ampStopB ~ (type + stress + MorD)^3 + (1|speaker) +
> (1|word), data=data)
>
> The p-values for some of the 2-way and 3-way interactions are significant
> at a 0.05 level and I have been trying to find out how to understand the
> exact nature of the interactions. Does anyone know if it is possible to
run
> post-hoc tests on mixed model (lmer) objects? I have read about TukeyHSD
> but it seems that this can only be run on anova (aov) objects.
>
> Any suggestions would be gratefully appreciated!
>
> Rachel Baker
>
> --
> --------------------------------------------------------------------------
> PhD student
> Dept of Linguistics
> Sidgwick Avenue
> University of Cambridge
> Cambridge
>
> ______________________________________________
> R-help at stat.math.ethz.ch 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.
--
Andrew Robinson
Department of Mathematics and Statistics Tel: +61-3-8344-9763
University of Melbourne, VIC 3010 Australia Fax: +61-3-8344-4599
http://www.ms.unimelb.edu.au/~andrewpr
http://blogs.mbs.edu/fishing-in-the-bay/
______________________________________________
R-help at stat.math.ethz.ch 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.
More information about the R-help
mailing list