Hi Josef:
So, the idea behind the contrast test is if I have the following model:
sf = area*phase*stream
Where area can be A1 or PEG, phase can be random or repeating and
stream can be foreground or background.
I can then test the following null hypothesis:
In A1 is the difference between sf in the repeating and random phase
in the foreground stream equal to the difference between the sf in the
repeating and random phase in the background stream. Or, in other
words
sf in area[A1], phase[foreground], phase[repeating] - sf in
area[A1]:phase[foreground]:phase[random] == sf in area[A1],
phase[background], phase[repeating] - sf in
area[A1]:phase[background]:phase[random]
I would then ask the same question, but for area[PEG].
So, if I set up my model in R using lmer:
m = lmer(sf~area*stream*phase+(1|cell/target), data=sf)
I can then test this by using post-hoc contrasts using glht:
contrasts = rbind('A1 : FG(rep-rand)-BG(rep-rand)'=c(0, 0, 0, 0, 0, 0, 1, 0),
'PEG: FG(rep-rand)-BG(rep-rand)'=c(0, 0, 0, 0, 0, 0, 1, 1))
tests = glht(m, linfct=contrasts)
In area[A1], the 7th coefficient, stream[foreground]:phase[repeating]
is the only difference between the two sides of the equation in the
null hypothesis. However, for area[PEG], the 7th and 8th coefficients
(area[PEG]:stream[foreground]:phase[repeating]) define the difference
between the two sides of the equation in the null hypothesis. Hence, I
cannot extract p-values directly from the output of the model. I need
to do a further test to see whether the combination of the 7th and 8th
terms are significant.
Brad