I am trying to produce a classical "before" and "after" table reporting original cohort and pseudopopulation before and after an IPTW analysis using the WeightIt package.
Essentially, what I want is something like what is reported in the the example provided here: https://stats.stackexchange.com/questions/496599/calculate-single-absolute-standardized-difference-across-levels-of-a-categorical
I've tried to use bal.tab
for that, but it seems that only balance summary can be accessed, and not the mean and SD or count and percentages for continuous and binary variables, respectively.
I can I do that?
I provide a workable example of an IPTW analysis.
library(WeightIt)
library(cobalt)
library(survey)
W.out <- weightit(treat ~ age + educ + race + married + nodegree + re74 + re75,
data = lalonde, estimand = "ATT", method = "ps")
bal.tab(W.out)