Causal inferences from complex observational and randomized studies with time-varying exposures or treatments.
I review identification and estimation of direct and indirect effects of time-varying treatments or actions. I describe the relationship between a number of modeling approaches: marginal structural models, the parametric g-formula, the iterated conditional expectation g-formula, direct effect structural nested models, and nested Markov models. I describe the strengths and weaknesses of each modeling approach and give examples of their application in medicine and public health. Finally I show how SWIGs (single world intervention graphs) can be used to effortlessly translate between the counterfactual and graphical approaches to causation.