Skip to content
Prev 12619 / 20628 Next

Follow up question testing three way interaction between two fixed effects and a random effect nested in a fixed

Dear Thierry

Thank you very much for your insightful reply. I was a bit unsure about
specifying Block as a random effect so thanks for further clarifying that
for me.

I have a follow up question about a similar, separate analysis if yourself
or the mailing list have time to think about. I need to include an
additional fixed factor (2 levels) which block (3 levels) is nested in
which then has line (35 levels) nested in it.

So the background is. I am measuring male and female fitness in Drosophila
(n=10/sex)  from 35 lines over three blocks (same line ID  during each
block), all this was performed twice using different 'tester' flies from
two different populations that were or were not infected with a parasite
(i.e.parasite infection +/-: PI) in order to examine whether parasite
infection deferentially affected intersexual fitness across lines.

So I'm primarily interested in the three way interaction between sex x line
x parasite infection (PI), 'does intersexual fitness differ between lines
if their fitness was measured using flies that were or were not infected
with the parasite?'

My model looks like this, modifying from Thierry's suggested code below
with PI (2 levels), Block (3 levels), Sex as fixed factors and line as a
random factor nested within Block, nested with PI, which I think is right.

M1<-lmer(Fitness~Sex+Block+PI+(0+Sex|PI:Block:Line), noNAdata)
M2<-lmer(Fitness~Sex+Block+PI+(1+PI:Block:Line), noNAdata)
anova(M1,M2)

Which produces the below output
refitting model(s) with ML (instead of REML)
Data: newdataWol
Models:
..1: Fitness ~ Sex + Block + WolInfection + (1 | WolInfection:Block:Line)
object: Fitness ~ Sex + Block + WolInfection + (0 + Sex |
WolInfection:Block:Line)
       Df   AIC   BIC  logLik deviance  Chisq Chi Df Pr(>Chisq)
..1     6 11051 11089 -5519.6    11039
object  8 10986 11037 -5485.1    10970 69.012      2  1.033e-15 ***

My question is does it seem as through I have specified my models correctly
in order to check the significance of the 3 way sex x line x parasite
infection
interaction?

Any suggestions would be greatly appreciated.

Eoin



On Thu, Oct 30, 2014 at 10:10 AM, ONKELINX, Thierry <
Thierry.ONKELINX at inbo.be> wrote: