mjskay / tidybayes

Bayesian analysis + tidy data + geoms (R package)
http://mjskay.github.io/tidybayes
GNU General Public License v3.0
718 stars 59 forks source link

comparison = "revpairwise" #325

Open ASKurz opened 1 month ago

ASKurz commented 1 month ago

Would it be possible to add a comparison = "revpairwise" option for the compare_levels() function?

mjskay commented 1 month ago

Does comparison = emmeans_comparison("revpairwise") do what you're looking for?

ASKurz commented 1 month ago

Yep, that's the contrast I was looking for.

mjskay commented 1 month ago

Is that sufficient for what you need? If so I'll close. Though I suppose it couldn't hurt to have a shortcut for it either, happy to take a PR if you're interested. Relevant bit would be around here: https://github.com/mjskay/tidybayes/blob/d777de661bb1ec57470f2946c2487509148fce3e/R/compare_levels.R#L9

ASKurz commented 1 month ago

It would be nice to have the "revpairwise" option available without needing to call the emmeans package, but if you have reasons to keep it as is, I won't push further.

mjskay commented 1 month ago

I'd be happy to have it, though I don't have much time atm so the fastest route would be if someone else made a PR ;)