is whether the feeling of loneliness mediates the impact of hearing loss on dementia, accounting for mortality as a competing event.

For this analysis, we used the hearing measurement recorded at wave 2 (e.g. 2004/05) and dichotomized subjects into two groups, namely normal ($A=0$) and limited ($A=1$) hearing ability. The longitudinal mediator “loneliness” was recorded from wave 3 (2006/07) to wave 7 (2014/15) and had two potential values, namely frequent ($M=1$) vs. infrequent feeling of loneliness ($M=0$). Alongside the mediator, four longitudinal confounders were recorded over time (i.e. wave 3 to wave 7), namely depression status (yes vs. no), mobility score (continuous), smoking status (non-smoker vs. current smoker) and alcohol status (non-drinker vs. current drinker). The baseline covariates consisted of age, gender, ethnicity (white vs. non-white), wealth (1=low, 5=high), education level (1 = no formal qualification, 2 = intermediate and 3 = higher education), marital status (yes vs. no), the use of hearing aids (yes vs. no), the presence of other comorbidities (i.e. hypertension, diabetes, stroke and cancer – yes vs. no) and the baseline values of the aforementioned time-varying confounders. A detailed description of these covariates was provided elsewhere [@davies2017; @hackett2018walking; @davies18; @rafnsson2020loneliness].

We assumed that the relationship between 