mixcure {mixcure} | R Documentation |
Mixture cure models
Description
Fit some parametric and semiparametric mixture cure models
Usage
mixcure(
lformula,
iformula,
data,
lmodel,
imodel,
postuncure = NULL,
emmax = 100,
eps = 1e-04,
savedata = FALSE,
debug = FALSE
)
Arguments
lformula |
a formula specifying the latency model |
iformula |
a formula specifying the incidence model |
data |
a data frame in which to interpret the variables named in the formulas in lmodel and imodel. |
lmodel |
a list of at least one component: fun, a text string specifying R function to fit the latency model. Other arguments to the function specified in fun can be added to the list. If lmodel is not supplied, the default is lmodel = list(fun = "coxph") and it fits the semiparametric PH latency model to the data. Other latency models currently implemented include
R functions for other regression models for survival data can be added as long as they meet certain criteria. See details on how a new regression model for survival data can be added. |
imodel |
a list of at least one component: fun, a text string specifying the R function to fit the incidence model. Other arguments to the function specified in fun can be added to the list. If imodel is not supplied, the default is imodel = list(fun = "glm", family = binomial()) and it fits the logistic regression as the incidence model to the data. The other incidence model currently implemented is fun = "gam". R functions for other regression models as the incidence model can be added as long as they meet certain criteria. See details on how a new regression model for incidence model can be added. A covariate may be used in both lformula and iformula. A model with the intercept term only in iformula assumes that there are cured patients and that the cure rates are the same for all patients. |
postuncure |
a vector of initial probabilities of being uncured for all subjects |
emmax |
the maximum number of EM iterations |
eps |
tolerance for EM convergence. Iteration stops once the relative change in log likelihoods is less than eps. |
savedata |
If TRUE, the data set will be stored in the final object. It
is mainly used for bootstrap in |
debug |
for debug purpose. |
Details
This function fits mixture cure models, where the latency and incidence parts of the mixture cure models can be fit using existing R regression functions. We implemented the logistic regression and the generalized additive model for the incidence part and the semiparametric proportional hazards and additive hazards models and the parametric failure time models for the latency parts. To include a new regression model xxx() for the incidence part, you need to add the following functions:
incidence.xxx()
coef.incidence.xxx()
loglik.incidence.xxx()
curepred.incidence.xxx()
To include a new regression model xxx() for the latency part, you need to add the following functions:
latency.xxx()
coef.latency.xxx()
loglik.latency.xxx()
survpred.latency.xxx()
When mixcure program ends, it may produce warning messages such as "In eval(expr, envir, enclos) : non-integer #successes in a binomial glm!." The message is due to the fact that glm is picky when it comes to specifying binomial models. It warns if it detects that the number of trials or successes is non-integer, but it still fits the model properly. If you want to suppress the warning (and you're sure it's not a problem), use family=quasibinomial instead.
This package requires the following R packages: survival, boot, survey and any packages that provide the latency and incidence models.
Value
a list consists of the following components:
ifit |
the final fit from the model for cure probability. |
lfit |
the final fit from the model for failure time of uncured subjects |
survprob |
the final estimate of the survival probability for each subject at its own observed time if uncured |
postuncure |
the final estimate of the posterior uncure probability for each subject based its observed values. The prior uncure probability can be obtained from ifit$uncureprob |
em |
a matrix containing the iterations of the EM algorithm and convergence errors (for debug purpose) |
Author(s)
Yingwei Peng
References
Peng, Y. and Yu, B. Cure Models: Methods, Applications, and Implementation. CRC/Chapman & Hall, 2020
Peng, Y. and Taylor, J. M. G. Cure models. In Klein, J., van Houwelingen, H., Ibrahim, J. G., and Scheike, T. H., editors, Handbook of Survival Analysis, Handbooks of Modern Statistical Methods series, chapter 6, pages 113-134. Chapman & Hall, Boca Raton, FL, USA, 2014
Peng, Y. Fitting semiparametric cure models. Computational Statistics & Data Analysis, 41: 481-490, 2003
See Also
summary.mixcure, predict.mixcure, plot.predict.mixcure
Examples
data(leukaemia)
z = mixcure(Surv(time, cens) ~ transplant, ~ transplant, data = leukaemia)