0
$\begingroup$

Let's say I have these estimated marginal means:

> emm <- emmeans(Model5, ~ Measurement * Condition)
> emm
 Measurement Condition emmean     SE   df lower.CL upper.CL
 B           L           7.98 0.0474 1788     7.89     8.07
 1           L           7.97 0.0474 1788     7.88     8.06
 2           L           8.04 0.0474 1788     7.95     8.14
 B           N           7.96 0.0474 1788     7.87     8.05
 1           N           8.00 0.0474 1788     7.91     8.10
 2           N           7.93 0.0474 1788     7.84     8.03

I want to check for significance, insider condition N: B vs 1 compared to B vs 2.

How can I do that?

I only found a way to do straightforward contrasts:

contrast(emm, list(
  "N_B vs N_1 " = c(0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0)
))

but not to do a comparison between two contrasts.

$\endgroup$

1 Answer 1

0
$\begingroup$

See this vignette section

And in general, there is an index to all the vignettes in the emmeans package, and you can often find answers to questions like this.

But a quick answer to thgis question is

contrast(emm, interaction = "consec")

which constructs all interaction contrasts involving consecutive levels of each factor.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.