| Compris | R Documentation |
An alternative approach to competing risk regression via multivariate transformation models
Compris(formula, data, subset, weights, na.action, offset,
primary = c("Coxph", "Colr", "BoxCox"),
competing = switch(primary, Coxph = "weibull",
Colr = "loglogistic",
BoxCox = "lognormal"),
NPlogLik = FALSE, theta = NULL,
optim = mltoptim(hessian = TRUE),
args = list(seed = 1, type = c("MC", "ghalton"), M = 1000),
fit = c("jointML", "none"),
scaleparm = FALSE, ...)
formula |
an object of class |
data |
an optional data frame, list or environment (or object
coercible by |
subset |
an optional vector specifying a subset of observations to be used in the fitting process. |
weights |
an optional vector of case weights to be used in the fitting
process. Should be |
na.action |
a function which indicates what should happen when the data
contain |
offset |
this can be used to specify an _a priori_ known component to
be included in the linear predictor during fitting. This
should be |
primary |
a character defining the marginal model for the primary event of interest, that is, the first status level. |
competing |
a character defining the marginal models for the remaining competing events. |
NPlogLik |
logical, optimise nonparametric likelihood defined in terms of multivariate probabilities. |
theta |
optional starting values. |
optim |
see |
args |
a list of arguments for |
fit |
character vector describing how to fit the model. The default is joint likelihood estimation of all parameters. |
scaleparm |
logical defining if variables in the linear predictor shall be scaled. Scaling is internally used for model estimation, rescaled coefficients are reported in model output. |
... |
addition arguments passed to primary or competing model function. |
This is a highly experimental approach to an alternative competing risk regression framework described by \bibcitettram::Czado:Keilegom:2022 and \bibcitettram::Deresa:Keilegom:2023, the implementation here is discussed in \bibcitettram::Siegfried:Tamasi:Hothorn:2026.
An object of class Mmlt, allowing to derive marginal time-to-event
distributions for the primary event of interest and all competing events.
*
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
m <- Compris(y ~ ch + age + hgb + clinstg, data = follic,
### speed-up to make CRAN happy
order = 4, ### less flexible log-cum. hazard
optim = mltoptim(), ### no numerical hessian
args = list(type = "ghalton",
M = 80)) ### only 80 MC integration points
### log-likelihood
logLik(m)
## Similar to Table 4 of Deresa & Van Keilegom (2023),
## but using a Gaussian copula instead of a Gumbel copula.
## marginal parameters
coef(m, type = "marginal")
## Kendall's tau
coef(m, type = "Kendall")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.