Mittinty and Vansteelandt [@mittinty2019longitudinal] for longitudinal natural effect models to enable the planned mediation analysis of an exposure via repeatedly measured mediators on a time-to-event endpoint subject to competing risks.

We proceed as follows. In the next section, we first describe the setting of interest. We then extend the natural effect proportional hazard model to take into account the longitudinal nature of the mediator. In the same section, we discuss the assumptions under which the path-specific direct and indirect effects derived from such model are identifiable from data, and provide a step-by-step procedure for estimating these effects. In section 3, we apply the proposed approach to analyze data from the English Longitudinal Study of Ageing [@steptoe2013cohort; @davies2017]. We end with some final remarks and a discussion.

Proposal {#sec2}
========

Natural Effect Models for longitudinal mediators and a time-to-event endpoint subject to competing risks
--------------------------------------------------------------------------------------------------------

Consider an observational study in which independent individuals $i = 1, \ldots, n$ are exposed to a categorical factor $A_i$ coded as $0, 1,\ldots, P-1$ for $P$ different categories. Longitudinal measurements of the mediator $M_{i0},M_{i1}\ldots, M_{iK}$ and of the covariates $L_{i0},L_{i1}\ldots, L_{iK}$ are subsequently recorded at baseline (subscript 0) and at visits $1, \ldots, K$, along 