-
-
Notifications
You must be signed in to change notification settings - Fork 61
Description
Describe the bug
This is a very minor bug but I'd greatly appreciate you all taking a look. Thanks for the great package! It looks like the print method of describe_posterior() is doing something that is changing the order of the credible intervals. I would expect them to be in increasing order but in some circumstances they print in a mixed-up order. I don't have an exhaustive list of circumstances when this happens, but it definitely happens when calling describe_posterior on an emmGrid object with test = 'pd' and test = 'p_ROPE', but oddly, not with other values of test.
To Reproduce
library(brms)
library(emmeans)
library(bayestestR)
fit <- brm(mpg ~ factor(cyl), data=mtcars)
emm <- emmeans(fit, ~ cyl)
describe_posterior(emm, ci = c(.5, .8, .95), test = 'p_map')
describe_posterior(emm, ci = c(.5, .8, .95), test = 'pd')
The first call to describe_posterior produces the correct order of CIs but the second call produces 50%, 95%, 80%.
Specifiations (please complete the following information):
- R version 4.5.0 on Windows 11
- Package version 0.17.0