by **reason180** » Sun Feb 16, 2020 2:54 am

It may be that people are skeptical of emmeans because they're not sure exactly how the estimated marginals relate to the regular old marginals.

I think in the case of an ANOVA, the estimated marginal means are identical to the marginal means UNLESS you're averaging over the levels of a know factor such that the averaged-over levels have unequal sample sizes. In the latter case, the estimated marginal mean are the means of the averaged-over means, rather than the means of raw data. Thus for example, if there are scores for left- and right-handed men and women, and if there are 10 left-handed and 90 right-handed participants, and if the ANOVA model includes handedness and gender as factors, and if one is interested in looking just at the main effect of gender then:

The estimated marginal means for the main effect of gender are not the mean scores for the women versus the mean scores for the men. Rather they are the mean of two means--the mean score for left-handed women and the mean score for right-handed women--versus the mean of two other means--the mean score for left-handed men and the mean score for right-handed men. Thus the estimated marginal means are the means that one would find had the study included an equal number of left- and right-handed participants.

But I don't know how to calculate the variances that correspond to those estimated marginal means (when the sizes of the averaged samples are unequal). This is because it's more complicated: It involves not just pooling variances (consistent with the equal-variance assumption) but also modeling what the variances would be had the sample sizes for the averaged categories been equal.

(Of course, all of this is even more complicated when the dealing with ANCOVA.)