subjects may therefore experience the event prior to the mediator being assessed[@lange13; @huang17; @vandenberghe2018surrogate]. Further complications arise from the mediator, loneliness, being repeatedly measured. While useful to better capture mediation via the entire longitudinal mediator process [@vansteelandt19], this also gives rise to complex time-varying confounding patterns whereby mediators (e.g. loneliness) and confounders (e.g. comorbidities) mutually influence each other over time. These complications have been addressed in a number of recent works [@zheng2017longitudinal; @lin17; @vansteelandt19].

A further complication that we must consider, and that we have not previously found being addressed in the literature, is the presence of competing risks by death. With observed - as opposed to counterfactual - event times, the modelling of cause-specific hazards is well known to simplify the handling of competing risks. However, the modelling of (cause-specific) hazards is not readily possible in the previous mediation analysis works [@zheng2017longitudinal; @lin17; @vansteelandt19], which instead focus on the analysis of survival chances. In view of this, in this paper, we will here introduce so-called natural effect proportional (cause-specific) hazard models, which directly parameterise the direct and indirect effects of a given exposure on the cause-specific hazard of the considered event. We will extend the weighting-based approach proposed by 