\[\LARGE d = \frac{\bar{x}_{treatment}-\bar{x}_{control}}{\sqrt{\frac{s^2_{treatment}+s^2_{control}}{2}}}\]
Calculate standardized mean differences
library(halfmoon) library(tidyverse) smds <- tidy_smd( df, .vars = c(confounder_1, confounder_2, ...), .group = exposure, .wts = wts # weight is optional )
Plot them! (in a Love plot!)
ggplot( data = smds, aes( x = abs(smd), y = variable, group = method, color = method ) ) + geom_love()