residuals.mixcure {mixcure} | R Documentation |
Residuals for mixture cure models
Description
Obtain residuals for the mixture cure models
Usage
## S3 method for class 'mixcure'
residuals(
object,
data,
type = c("WLCH", "Cox-Snell", "M-Cox-Snell", "Martingale", "M-Martingale", "M2",
"M3", "D2"),
type2 = c("residuals", "partial"),
model = c("latency", "incidence"),
...
)
Arguments
object |
an object of mixcure |
data |
the data used to obtain mixcure object. |
type |
residuals type. WLCH is a modified residual proposed in Wileyto et al (2013). The rest types of residuals are defined in the same way as in the classic survival models. |
type2 |
residual type, either "residuals" for regular residuals or "partial" for partial residuals), |
model |
if "latency" (default), residuals for latency model are generated. Otherwise, "incidence" means that residuals for incidence model are generated. |
... |
for compatibility purpose. Not used. |
Details
This function computes residuals for the fitted model from mixcure().
Value
It is a list containing at least the following components:
type |
residuals type |
residuals |
residuals of the model |
Author(s)
Yingwei Peng
References
Peng, Y. and Taylor, J. M. G. Residual-based model diagnosis methods for mixture cure models. Biometrics, 73:495–505, 2017
See Also
mixcure
Examples
data(leukaemia)
residuals(mixcure(Surv(time, cens) ~ transplant, ~ transplant,
data = leukaemia), data = leukaemia, type = "Martingale")