Closed Dallak closed 2 years ago
As documented, emmeans constructs a reference grid comprising all combinations of factor levels and specified covariate levels. So in this case, that would include all six combinations of your two factors.
You don't show the code for the model you fitted, but I surmise that your model formula had poa + voicing
, without the interaction poa:voicing
. When you have an additive model like that, it is possible to estimate the mean for all six factor combinations. Had you included the interaction in the model, that nonexistent combination would have been flagged NonEst
(non-estimable) in the output.
Thanks for this helpful input! This is correct. Here is the model structure:
var ~ position*voicing*target_vowel+poa+rep+
(1+position*voicing*target_vowel+poa| subject) +
(1+position| word)
Dear all,
I ran the following code
m5 <- emmeans(vot_1, ~ poa * voicing)
wherepoa
has three levels: 1-bilabial
2-alveolar
3-velar
andvoicing
has two level: 1-voiced
2-voiceless
Note that the
bilabial
level is missing thevoiceless
contrast (it only containsvoiced
). The expected outcome is something like this one:But
emeans
seems to calculate the mean even for the missing the levels forbilabial
(bilabial voiceless
).Is there a way to fix this? P.S. I'm using
contr.sum
and not sure if this is relevant to calculating the emmeans for these contrasts.Many thanks in advance!