07. Marginal models in recurrent events
David Herman
marginal_models.Rmd
knitr::opts_chunk$set(warning = FALSE, message = FALSE)
library(revents)
library(survival)
In marginal models, dependency structures between times of recurring events within a subject are not of interest. However, it can also be partially specified as in this example, with several covariates but without time-dependent covariates that may be of interest in conditional models (i.e. symptoms that vary between events).
In marginal models, the data layout 2 is needed for LWA or WLW models while data layout 1 continues being used for the marginal rates models.
# Load data layout corresponding to the first and second data layout
data("data_layout_1", package = "revents")
data("data_layout_2", package = "revents")
data_layout_1 <- revents::data_layout_1
data_layout_2 <- revents::data_layout_2
Wei-Lin-Weissfeld (WLW) (overall effect)
Compared to other models in which events happen successively, the WLW method is well suited to multi-type event data in which the natural order of the repeated events is no predictable.
The WLW model tend to yield biased estimates in recurrent event analyses (usually overestimation of the true effect) due to the strong assumption that all patients are included in the risk set for each and relapse stratum, allowing the effect on earlier events to affect subsequent events.
wlw.relapses <- coxph(Surv(TSTOP, STATUS) ~ (DISEASE_COURSE + AGE + SEX + RACE + TIME_SINCE_DIAGNOSIS) + cluster(ID) + strata(SEVENT), data = data_layout_2)
wlw.relapses
#> Call:
#> coxph(formula = Surv(TSTOP, STATUS) ~ DISEASE_COURSE + AGE +
#> SEX + RACE + TIME_SINCE_DIAGNOSIS + strata(SEVENT), data = data_layout_2,
#> cluster = ID)
#>
#> coef exp(coef) se(coef) robust se z
#> DISEASE_COURSESPMS -0.2936479 0.7455390 0.0226855 0.0188054 -15.615
#> AGE 0.0015116 1.0015127 0.0009128 0.0008701 1.737
#> SEXMale -0.0009643 0.9990362 0.0179781 0.0161890 -0.060
#> RACEWhite 0.0552958 1.0568532 0.0313109 0.0308863 1.790
#> TIME_SINCE_DIAGNOSIS 0.0007236 1.0007239 0.0004167 0.0002441 2.965
#> p
#> DISEASE_COURSESPMS < 2e-16
#> AGE 0.08234
#> SEXMale 0.95250
#> RACEWhite 0.07341
#> TIME_SINCE_DIAGNOSIS 0.00303
#>
#> Likelihood ratio test=232.6 on 5 df, p=< 2.2e-16
#> n= 15756, number of events= 14501
However, as we can see in this study, the WLW model may underestimate the true effect of disease course in the risk of relapses in the SPMS group.
Lee-Wei-Amato model (LWA)
With difference to the WLW, the LWA has a common baseline hazard and unrestricted risk set and it was developed with the aim to study clustered data such as siblings. This model often provide bias estimates effect because it allows a subject to be at risk for several events simultaneously.
lwa.relapses <- coxph(Surv(TSTOP, STATUS) ~ (DISEASE_COURSE + AGE + SEX + RACE + TIME_SINCE_DIAGNOSIS) + cluster(ID), data = data_layout_2)
lwa.relapses
#> Call:
#> coxph(formula = Surv(TSTOP, STATUS) ~ DISEASE_COURSE + AGE +
#> SEX + RACE + TIME_SINCE_DIAGNOSIS, data = data_layout_2,
#> cluster = ID)
#>
#> coef exp(coef) se(coef) robust se z
#> DISEASE_COURSESPMS -0.2124480 0.8086023 0.0224830 0.0119610 -17.762
#> AGE 0.0011858 1.0011865 0.0009147 0.0005862 2.023
#> SEXMale -0.0082235 0.9918102 0.0179757 0.0106347 -0.773
#> RACEWhite 0.0476025 1.0487537 0.0312979 0.0210217 2.264
#> TIME_SINCE_DIAGNOSIS 0.0003828 1.0003828 0.0004138 0.0001327 2.884
#> p
#> DISEASE_COURSESPMS < 2e-16
#> AGE 0.04307
#> SEXMale 0.43936
#> RACEWhite 0.02355
#> TIME_SINCE_DIAGNOSIS 0.00393
#>
#> Likelihood ratio test=126 on 5 df, p=< 2.2e-16
#> n= 15756, number of events= 14501
Lin-Wei-Yang-Ying (LWYY)
LWYY can be seen as analogue to the AG model, but with less stronger assumptions as it allows arbitrary dependence structure between recurrent events and a varying rate function over time. This and the NB model are one of the most used rate-based models for recurrent event analyses in absence of terminal events or with negligible mortality in clinical trial designs.
lwyy.relapses <- coxph(Surv(TSTART, TSTOP, STATUS) ~ DISEASE_COURSE + AGE + SEX + RACE + TIME_SINCE_DIAGNOSIS + cluster(ID), data = data_layout_1)
lwyy.relapses
#> Call:
#> coxph(formula = Surv(TSTART, TSTOP, STATUS) ~ DISEASE_COURSE +
#> AGE + SEX + RACE + TIME_SINCE_DIAGNOSIS, data = data_layout_1,
#> cluster = ID)
#>
#> coef exp(coef) se(coef) robust se z
#> DISEASE_COURSESPMS -0.5718587 0.5644753 0.0403615 0.0279727 -20.443
#> AGE 0.0028656 1.0028697 0.0015249 0.0013003 2.204
#> SEXMale -0.0203516 0.9798541 0.0305203 0.0248691 -0.818
#> RACEWhite 0.1109051 1.1172889 0.0525239 0.0489264 2.267
#> TIME_SINCE_DIAGNOSIS 0.0011352 1.0011358 0.0007586 0.0003872 2.932
#> p
#> DISEASE_COURSESPMS < 2e-16
#> AGE 0.02754
#> SEXMale 0.41316
#> RACEWhite 0.02340
#> TIME_SINCE_DIAGNOSIS 0.00337
#>
#> Likelihood ratio test=290.9 on 5 df, p=< 2.2e-16
#> n= 6347, number of events= 5092
Even though the AG (with robust SE) and LWYY have similar numerical values without time dependant covariates, they model different ratios (AG models intensity function and the marginal rates model models rate of events). In this example, by partially considering the dependency structure, the LWYY model estimated a similar risk reduction than the AG model of 44% (RR: 0.57) in the SPMS group compared to RRMS.