Storytelling with data is extremely important. I am trying to more discover the flexibility of a posterior for presenting an effect size. What are the different possibilities for showing a posterior-based effect size (point estimate + credible intervals)?
I give few examples (group A and B weight difference) that I found out by myself.
Data, model and posterior
library(tidyverse)
df = bind_rows(
tibble(weight = rnorm(100, 80, 5), group = rep("A", length.out = T)),
tibble(weight = rnorm(100, 60, 5), group = rep("B", length.out = T)),
)
library(brms)
fit = brm(weight ~ (1 | group), df)
posterior = posterior_samples(fit) %>% clean_names() %>% mutate(A = b_intercept + r_group_a_intercept, B = b_intercept + r_group_b_intercept) %>% select(A, B)
Option 1: showing difference in natural scale (group A - group B)
posterior %>% mutate(difference = A-B) %>% posterior_summary()
Estimate Est.Error Q2.5 Q97.5
A 79.00722 0.5201468 77.97750 80.01733
B 60.00173 0.5233391 58.97731 61.02931
difference 19.00550 0.7388529 17.55313 20.41760
Option 2: showing difference in times (group A/group B)
posterior %>% mutate(difference = A/B) %>% posterior_summary()
Estimate Est.Error Q2.5 Q97.5
A 79.00722 0.52014681 77.977501 80.017334
B 60.00173 0.52333915 58.977314 61.029313
difference 1.31685 0.01441019 1.289337 1.344716
Option 3: showing difference as percentage ((A-B)*100)/A)
posterior %>% mutate(difference = ((A-B)*100)/A) %>% posterior_summary()
Estimate Est.Error Q2.5 Q97.5
A 79.00722 0.5201468 77.97750 80.01733
B 60.00173 0.5233391 58.97731 61.02931
difference 24.05209 0.8311302 22.44078 25.63488
Are these correct? What are other cool possibilities that I could use for showing the difference (effect size)?