1

I'm using conditional_effects from the library brms and I saw that emmeans average the result over the levels of different factor when conditional_effects select the first one.

So, how could I do the same thing with conditional effects ?

Thanks

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459

1 Answers1

0

You don't show your code so I don't know what t hose factors are. But if you want to condition on a factor, just include it in the specs, say as a by variable. e.g.,

emmeans(model, ~ treatment | dose)

Or if you want only one level of dose, specify it in at:

emmeans(model, ~ treatment, at = list(dose = 50))
Russ Lenth
  • 5,922
  • 2
  • 13
  • 21