into the proportional hazard regression model.

In practice, it might however be the case that censoring is dependent upon post-baseline factors such as the longitudinal mediator and confounder levels that are measured prior to censoring (figure 2b). In Appendix A2, we show that if at any time $t$, the risk of future events for patients who drop out of the study is not different from that of patients who have the same exposure, mediator and covariate history up to time $t$ but remain in the study, the so-called inverse probability of censoring weighting approach can be used to account for censoring. More precisely, the parameters indexing models (1) and (2) are then estimated by solving the following equation: $$\begin{aligned}
&\bigintssss_0^\infty \sum_{i, a, a^*}\left\{\begin{pmatrix} a \\ a^* \end{pmatrix} - \frac{\sum_{a,a^*}\hat E\left[\begin{pmatrix} a \\ a^* \end{pmatrix}\cdot R_i(t)\cdot I(C_i>t)\cdot W_i(\lfloor t \rfloor )\cdot e^{\alpha_{1j}a + \alpha_{2j}a^*}\right]}
{\sum_{a,a^*} \hat E\left[R_i(t)\cdot I(C_i>t)\cdot W_i(\lfloor t \rfloor )\cdot e^{\alpha_{1j}a + \alpha_{2j}a^*}\right]}\right\}\cdot \\
&\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\cdot R_i(t)\cdot I(C_i>t)\cdot W_i(\lfloor t \rfloor )\left(dN_i(t) - \lambda_0(t)\cdot e^{\alpha_{1j}a + \alpha_{2j}a^*}dt\right) = 0\end{aligned}$$ where $$\begin{aligned}
W_i(\lfloor t \rfloor,a,a^*) =& \frac{\prod_{s: t_s \le \lfloor t \rfloor} \hat{\text{Pr}}(M_{s,i}|A_i = a^*, \overline{M}_{s-1,i}, \overline{L}_{s,i}, T_i\ge t_s, C_i \ge t_s)}{\prod_{s: t_s \le \lfloor t \rfloor} \hat{\text{Pr}}(M_{s,i}|A_i = a, \overline{M}_{s-1,i}, 