Parametric cure models are a type of parametric survival model model in which it is assumed that there are a proportion of subjects who will not experience the event. In a mixture cure model, these 'cured' and 'uncured' subjects are modeled separately, with the cured individuals subject to no excess risk and the uncured individuals subject to excess risk modeled using a parametric survival distribution. In a non-mixture model, a parametric survival distribution is scaled such that survival asymptotically approaches the cure fraction.
The following code fits a mixture cure model to the bc
dataset from flexsurv
using a Weibull distribution and a logistic link function for the cure fraction:
library(flexsurvcure) cure_model <- flexsurvcure(Surv(rectime, censrec)~group, data=bc, link="logistic", dist="weibullPH", mixture=T) print(cure_model)
Model results can be displayed graphically using the plot
S3 method:
plot(cure_model)
Predicted survival probabilities can also be generated using the summary
S3 method:
summary(cure_model, t=seq(from=0,to=3000,by=1000), type="survival", tidy=T)
More complex models may be fitted by adding covariates to the parametric distribution used to model the uncured individuals. This is done by passing a list of formula, named according to the parameters affected, through the anc argument:
cure_model_complex <- flexsurvcure(Surv(rectime, censrec)~group, data=bc, link="logistic", dist="weibullPH", mixture=T, anc=list(scale=~group)) print(cure_model_complex) plot(cure_model_complex)
Non-mixture cure models can be fit by passing mixture=FALSE
to flexsurvcure
:
library(flexsurvcure) cure_model_nmix <- flexsurvcure(Surv(rectime, censrec)~group, data=bc, link="loglog", dist="weibullPH", mixture=F) print(cure_model_nmix)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.