Quantifying Direct and Indirect Effects Through Joint Modeling of Terminal Events and Gap Times Between Recurrent Events
Pub. online: 1 April 2026
Type: Statistical Data Science
Open Access
Received
24 July 2025
24 July 2025
Accepted
3 March 2026
3 March 2026
Published
1 April 2026
1 April 2026
Abstract
Joint models can describe the relationship between recurrent and terminal events. Typically, recurrent events are modeled using the total time scale, assuming constant covariate effects on each recurrent event. However, modeling the gap time between recurrent events could allow varying covariate effects and offer greater flexibility and accuracy. For instance, in HIV-infected patients, the intervals between the first occurrence of opportunistic infections (OIs) may follow a different distribution compared to later OIs. However, limited research has focused on mediation analysis using joint modeling of gap times and survival time. In this work, we propose a novel joint modeling approach that studies the mediation effect of recurrent events on survival outcomes by modeling the recurrent events by gap time. This allows us to handle cases where the first occurrence of a recurrent event behaves differently from subsequent events. Additionally, we use a relaxed “sequential ignorability” assumption to address unmeasured confounding. Simulation studies demonstrate that our model performs well in estimating both model parameters and mediation effects. We apply our method to an AIDS study to evaluate the comparative effectiveness of two treatments and the effect of baseline CD4 counts on overall survival, mediated by recurrent opportunistic infections modeled through gap times.
Supplementary material
Supplementary MaterialSupplementary Material Sections I-IV mentioned in the main text are provided as a pdf supplement file. Data supporting the findings of this paper can be requested as described in the data availability statement on page 5 of the Supplementary Material. The SAS and R codes for the simulation and data analysis of this paper are available at https://github.com/nfang-cloud/Joint_Model_Gap_Time.
References
Aalen O (1978). Nonparametric inference for a family of counting processes. The Annals of Statistics, 6: 701–726. https://doi.org/10.1214/aos/1176344247
Abrams D, Goldman A, Launer C, Korvick J, Neaton J,..., Deyton L, (1994). A comparative trial of didanosine or zalcitabine after treatment with zidovudine in patients with human immunodeficiency virus infection. The Terry Beirn community programs for clinical research on AIDS. The New England Journal of Medicine, 330(10): 657–662. https://doi.org/10.1056/NEJM199403103301001
Andersen PK, Gill RD (1982). Cox’s regression model for counting processes: A large sample study. The Annals of Statistics, 10: 1100–1120. https://doi.org/10.1214/aos/1176345976
Avanzini S, Antal T (2019). Cancer recurrence times from a branching process model. PLoS Computational Biology, 15(11): e1007423. https://doi.org/10.1371/journal.pcbi.1007423
Darbyshire J, Foulkes M, Peto R, Duncan W, Babiker A,..., Walker SA (2000). Zidovudine (AZT) versus AZT plus didanosine (ddi) versus AZT plus zalcitabine (ddc) in HIV infected adults. Cochrane Database of Systematic Reviews, 3: CD002038. https://doi.org/10.1002/14651858.CD002038
French M, Keane N, McKinnon E, Phung S, Price P (2007). Susceptibility to opportunistic infections in HIV-infected patients with increased CD4 t-cell counts on antiretroviral therapy may be predicted by markers of dysfunctional effector memory CD4 t cells and b cells. HIV Medicine, 8(3): 148–155. https://doi.org/10.1111/j.1468-1293.2007.00445.x
Huang CY, Wang MC (2004). Joint modeling and estimation for recurrent event processes and failure time data. Journal of the American Statistical Association, 99: 1153–1165. https://doi.org/10.1198/016214504000001033
Huang X, Liu L (2007). A joint frailty model for survival time and gap times between recurrent events. Biometrics, 63: 389–397. https://doi.org/10.1111/j.1541-0420.2006.00719.x
Lahoz R, Fagan A, McSharry M, Proudfoot C, Corda S, Studer R (2022). Recurrent heart failure hospitalizations increase the risk of mortality in heart failure patients with atrial fibrillation and type 2 diabetes mellitus in the United Kingdom: A retrospective analysis of clinical practice research datalink database. BMC Cardiovascular Disorders, 22(1): 234. https://doi.org/10.1186/s12872-022-02665-y
Liu L, Huang X (2008). The use of Gaussian quadrature for estimation in frailty proportional hazards models. Statistics in Medicine, 27(14): 2665–2683. https://doi.org/10.1002/sim.3077
Liu L, Wolfe R, Huang X (2004). Shared frailty models for recurrent events and a terminal event. Biometrics, 60: 747–756. https://doi.org/10.1111/j.0006-341X.2004.00225.x
Liu L, Zheng C, Kang J (2018). Exploring causality mechanism in the joint analysis of longitudinal and survival data. Statistics in Medicine, 37: 3733–3744. https://doi.org/10.1002/sim.7838
Lu J, Han J, Zhang C, Yang Y, Yao Z (2017). Infection after total knee arthroplasty and its gold standard surgical treatment: Spacers used in two-stage revision arthroplasty. Intractable and Rare Diseases Research, 6(4): 256–261. https://doi.org/10.5582/irdr.2017.01049
Martin-Iguacel R, Reyes-Urueñaa J, Brugueraa A, Aceitóna J, Díaza Y (2022). Determinants of long-term survival in late HIV presenters: The prospective PISCIS cohort study. EClinicalMedicine, 52: 101600. https://doi.org/10.1016/j.eclinm.2022.101600
Martinussen T, Stensrud M (2023). Estimation of separable direct and indirect effects in continuous time. Biometrics, 79(1): 127–139. https://doi.org/10.1111/biom.13559
McKennan C, Nicolae D (2022). Estimating and accounting for unobserved covariates in high-dimensional correlated data. Journal of the American Statistical Association, 117: 225–236. https://doi.org/10.1080/01621459.2020.1769635
Neaton J, Wentworth D, Rhame F, Hogan C, Abrams D, Deyton L (1994). Considerations in choice of a clinical endpoint for aids clinical trials. Statistics in Medicine, 13(19–20): 2107–2125. https://doi.org/10.1002/sim.4780131919
Niu F, Zheng C, Liu L (2023). Exploring causal mechanisms and quantifying direct and indirect effects using a joint modeling approach for recurrent and terminal events. Statistics in Medicine, 42(22): 4028–4042. https://doi.org/10.1002/sim.9846
Rondeau V (2010). Statistical models for recurrent events and death: Application to cancer events. Mathematical and Computer Modelling, 52: 949–955. https://doi.org/10.1016/j.mcm.2010.02.002
Serrano-Villara S, Deeks S (2015). CD4/CD8 ratio: An emerging biomarker for HIV. The Lancet HIV, 2(3): e76–e77. https://doi.org/10.1016/S2352-3018(15)00018-1
Soh J, Huang Y (2021). A varying-coefficient model for gap times between recurrent events. Lifetime Data Analysis, 27: 437–459. https://doi.org/10.1007/s10985-021-09523-7
Wang Y, Blei D (2019). The blessing of multiple causes. Journal of the American Statistical Association, 114: 1574–1596. https://doi.org/10.1080/01621459.2019.1686987
Zheng C, Zhou X (2017). Causal mediation analysis on failure time outcome without sequential ignorability. Lifetime Data Analysis, 23: 533–559. https://doi.org/10.1007/s10985-016-9377-9