flexsurvcure {flexsurvcure} | R Documentation |
Mixture and Non-Mixture Parametric Cure Models
Description
Mixture and non-mixture cure models using flexible base distributions from the flexsurv package.
Usage
flexsurvcure(
formula,
data,
weights,
bhazard,
subset,
dist,
na.action,
link = "logistic",
mixture = T,
...
)
Arguments
formula |
A formula expression in conventional R linear modeling
syntax. The response must be a survival object as returned by the
If there are no covariates, specify By default, covariates are placed on the “theta” parameter of the distribution, representing the cure fraction, through a linear model with the selected link function. Covariates can be placed on parameters of the base distribution by using the
name of the parameter as a “function” in the formula. For example, in a
Weibull model, the following expresses the scale parameter in terms of age
and a treatment variable
However, if the names of the ancillary parameters clash with any real
functions that might be used in formulae (such as
|
data |
A data frame in which to find variables supplied in
|
weights |
Optional variable giving case weights. |
bhazard |
Optional variable giving expected hazards for relative survival models. |
subset |
Vector of integers or logicals specifying the subset of the observations to be used in the fit. |
dist |
A string representing one of the built-in distributions of flexsurv.
|
na.action |
a missing-data filter function, applied after any 'subset'
argument has been used. Default is |
link |
A string representing the link function to use for estimation of the cure fraction. Defaults to "logistic", but also supports "loglog", "probit", and "identity". |
mixture |
optional TRUE/FALSE to specify whether a mixture model should be fitted. Defaults to TRUE. |
... |
other arguments to be passed to |
Details
This function works as a wrapper around flexsurvreg
by
dynamically constructing a custom distribution using wrappers to the
pdf and cdf functions.
In a parametric mixture model, it is assumed that there exists a group of individuals who experience no excess mortality, with the proportion of such individuals being given by the cure fraction parameter, and a parametric distribution representing the excess mortality for the remaining individuals.
By contrast, a parametric non-mixture model simply rescales an existing parametric distribution such that the probability of survival asymptotically approaches the cure fraction parameter as time approaches infinity.
Examples
flexsurvcure(Surv(rectime,censrec)~group, data=bc, dist="weibull", anc=list(scale=~group))
flexsurvcure(Surv(rectime,censrec)~group, data=bc, dist="lnorm", mixture = FALSE)
flexsurvcure(Surv(rectime,censrec)~group, data=bc, dist="weibull", link="loglog")