Residual balancing is a robust method of constructing weights for
marginal structural models, which can be used to estimate marginal effects of
time-varying treatments and controlled direct/mediator effects in causal mediation
analysis (Zhou and Wodtke 2020