I'm looking for a way to fit survival trees with competing risk.
Can I use the function LTRCART
in the LTRCtrees package in R to fit a survival tree using the dataset obtained from the finegray
function in survival R package.
Here a reproducible example using mgus2
data in survival
package:
library(survival)
data("mgus2")
etime <- with(mgus2, ifelse(pstat==0, futime, ptime))
event <- with(mgus2, ifelse(pstat==0, 2*death, 1))
event <- factor(event, 0:2, labels=c("censor", "pcm", "death"))
ds_finegray <- finegray(Surv(etime, event) ~ age + sex + mspike,
data = mgus2, etype = "pcm")
library(LTRCtrees)
survTree_LTRC <- LTRCART(Surv(fgstart,fgstop, fgstatus) ~ age + sex + mspike,
data = ds_finegray, weights = ds_finegray$fgweights)
survTree_LTRC
library(partykit)
survTree_LTRC_party <- as.party(survTree_LTRC)
survTree_LTRC_party$fitted[["(response)"]] <-
Surv(ds_finegray$fgstart, ds_finegray$fgstop, ds_finegray$fgstatus)
plot(survTree_LTRC_party)
A shown in the example there are no issues with the R
programming. My question is about the consistency of the split method used in the rpart
function. This uses a splitting criterion based on a node deviance measure between a saturated model log–likelihood and a maximized log–likelihood, approximating the full likelihood by replacing the baseline cumulative hazard function by the Nelson–Aalen estimator (8.4 section in rpart vignette).
Since finegray
applies a Fine-Gray model to competing risk (multi-state) data, giving as result a dataset with interval censoring time and weights <1 for observations with competing events, I'm not able to understand whether the assumption made by the rpart
routine are still valid for this kind of data.