$(T,D)$, as well as between $A$ and $M_t$ at any time. Besides, we assume there are no unmeasured confounders of the relationship between the time-to-event outcome and the mediator at any time. In figure 1, the latter assumption is satisfied since conditioning on the exposure $A$ and the history of the time-varying confounder $L$ up to time $t$ is sufficient to adjust for confounding of the relationship between the time-to-event outcome $T$ and the mediator level at time $t$. Our development allows for the presence of unmeasured common causes of the mediators over time (i.e. denoted $U_m$ in figure 1) and separate, independent unmeasured common causes of the baseline/time-varying confounders and the survival time $(T,D)$ (i.e. denoted $U_l$).

In what follows, we generalize the standard estimation procedure for the popular marginal strutural models to fit models (1) and (2). For this, we make the assumption that censoring is non-informative, in the sense that at any time, the instantaneous risk of the event among patients who then drop out of the study is not different (at all future times) from that of patients who remain, conditional on the exposure level. Under the aforementioned assumptions, Appendix 1 shows that consistent estimators of 