# Comparing across outputs of emmeans

I have a regression model analyzing an continuous acoustic value, F1, based on three categorical predictors: vowel pair, tongue root position, and syllable number. My model includes all possible interactions and a random intercept for speaker. So, F1 ~ pair * tongue root position * syllable + (1|speaker).

Vowel pairs are defined thusly (approximations based on American English):
Pair 1: /i/ (the vowel in "beet") vs /ɪ/ (the vowel in "bit")
Pair 2: /e/ (approximately the vowel in "bait") vs /ɛ/ the vowel in "bet")
Pair 3: /u/ (the vowel in "boot") vs /ʊ/ (the vowel in "book")
Pair 4: /o/ (the vowel in "boat") vs /ɔ/ (the vowel in "bought")

From this I can generate pairwise comparisons in emmeans, comparing for instance the difference between F1 of /ɪ/ and /i/ in syllable 1 (comparison: pair = 1; tongue root position = 0 vs 1; syllable = 1) and every other pairwise comparison. I'm fine up to this point.

However, what I'm really interested in is comparing different pairwise comparisons to one another. I want to compare every other within-pairing difference to /ɪ/ vs /i/ in syllable 1. So, I want to see if the difference between F1 of /e/ and /ɛ/ in syllable 2 is larger than the difference of F1 in /ɪ/ and /i/ in syllable 1, if the difference in F1 of /u/ and /ʊ/ in syllable 2 is larger than the difference of F1 in /ɪ/ and /i/ in syllable 1 and so on and so forth.

I can take the output of emmeans and run t-tests over these. For instance, if the difference between F1 of /ɪ/ vs /i/ in syllable 1 is 0.32z, SE of 0.11, with n=150; the difference between F1 of /e/ and /ɛ/ in syllable 2 is 0.54z, SE of 0.08, n=150, I can plug these into a t-test, but that seems inappropriate.

Alternatively, I could take the data I have and derive a direct Delta-F1 by pairing tokens of /ɪ/ and /i/, /e/ and /ɛ/, etc to generate Delta-F1 values for each pairing. For instance, if the measurement for a given token of /i/ is -1.81z and the measurement for a given token of /ɪ/ is -1.46z, I would take the difference, 0.35z, as an input data point for the regression, with n' = original n/2. This would, in turn, be the input to the regressionː Delta-F1 ~ pair * syllable + (1|speaker), and then pairwise comparisons would be handled the usual way.

Which of these is most appropriate? Are there alternative ways to analyze this that I'm just unaware of?

What you are asking for is interaction contrasts, or contrasts of contrasts. You can do something like:

emm <- emmeans(model, ~ tongue * syllable)
contrasts(emm, interaction = "pairwise")


Or equivalently,

emm <- emmeans(model, ~ tongue * syllable)
con <- contrast(emm, "pairwise", by = "syllable", name = "tongue_diff")
contrast(con, "pairwise", by = "tongue_diff")


You can do analogous things with different combinations of the factors, or with all three factors (in which case the second method requires 4 steps, and two factors in each by spec).

See vignette("interactions", "emmeans") and the section on "interaction contrasts" for more discussion.