if (require("randomForestSRC")) {
library("survival")
## Competing risk data set involving follicular cell lymphoma
## (from doi:10.1002/9780470870709)
data("follic", package = "randomForestSRC")
## Therapy:
### Radiotherapy alone (RT) or Chemotherapy + Radiotherapy (CMTRT)
follic$ch <- factor(as.character(follic$ch),
levels = c("N", "Y"), labels = c("RT", "CMTRT"))
## Clinical state
follic$clinstg <- factor(follic$clinstg,
levels = 2:1, labels = c("II", "I"))
## Pre-processing as in Deresa & Van Keilegom (2023)
follic$time <- round(follic$time, digits = 3)
follic$age <- with(follic, (age - mean(age)) / sd(age)) ## standardised
follic$hgb <- with(follic, (hgb - mean(hgb)) / sd(hgb)) ## standardised
## Setup `Surv' object for fitting Compris():
### "status" indicator with levels:
### (1) independent censoring (admin_cens)
### (2) primary event of interest (relapse)
### (3) dependent censoring (death)
follic$status <- factor(follic$status,
levels = 0:2, labels = c("admin_cens", "relapse", "death"))
follic$y <- with(follic, Surv(time = time, event = status))
## Fit a Gaussian Copula-based Cox Proportional Hazards Model with
## a marginal "Coxph" model for the primary event of interest and
## a Weibull "Survreg" model for dependent censoring
## (don't test as it takes too long for CRAN)
m <- Compris(y ~ ch + age + hgb + clinstg, data = follic, log_first = TRUE)
summary(m)
## Kendall's tau
coef(m, type = "Kendall")
## Similar to Table 4 of Deresa & Van Keilegom (2023),
## but using a Gaussian copula instead of a Gumbel copula.
}
Run the code above in your browser using DataLab