Fit mixture cure models with random effects based on numerical integration.
intcure(
formula = formula(data),
cureform = NULL,
data = sys.parent(),
subset,
na.action,
bt = NULL,
gm = NULL,
basepara = NULL,
sigma = c(0, 0, 0),
optimcfg = list(ndeps = 0.001, maxit = 1000, reltol = 1e-05, method = "Nelder-Mead",
hessian = FALSE),
intcfg = list(eps = 1e-04, lower = c(-5, -5), upper = c(5, 5)),
basedist = c("exponential", "weibull", "piecewise"),
npiece = 3,
piececut = NULL,
piececuttype = c("quantile", "even"),
model = FALSE,
y = TRUE,
x = FALSE,
z = FALSE,
funval = FALSE,
debug = c("intcure", "integration", "optim")
)a formula expression similar to the one used in survreg
and coxph. The response is a survival object returned by the Surv() function.
It is used to specify the time (and censoring variable) variable and
covariates in the model for uncured patients. A covariate that defines
clusters in data will be in cluster function. See coxph() for details
If random effects are specified in sigma and cluster is not specified,
every subject forms its own cluster.
a formula expression similar to formula except that
it does not contain a response. It is used to specify the effects
of covariates on the cure rate. A covariate that defines clusters
in data will be in cluster function as in formula. However, currently
it is not used in the function because we assume that both components
in cure model use the same cluster structure
If random effects are specified in sigma and cluster is not specified,
every subject forms its own cluster.
standard arguments for R model functions
a vector of initial value of beta in the latency model.
It is optional. If survreg is used to get initial values,
-survreg's bt/survreg's scale = bt
a vector of initial value of gamma in the incidence model. It is optional
a vector of initial values of the parameters in the baseline
distribution. They are the log rate if baseline = "exponential", log shape and
log rate if baseline = "weibull", and log hazard if baseline = "piecewise".
It is optional. If survreg is used to get initial values, then
survreg's scale = 1/weibull shape and
survreg's intercept = -log(weibull rate)/weibull shape
if basedist = "weibull", and survreg's intercept = -log(rate) if
basedist = "exponential". Inappropriate initial values can cause
some problems in adaptIntegrate function.
a vector of 3 corresponding to log standard deviation of u and v,
and a Fisher's z-transformed correlation coefficient of u and v.
If any of the value is set to NA, the corresponding effects
will not be present in the model
a list of method, maxit, reltol,
hessian, ndeps arguments for R function optim().
The default optimization method is Nelder-Mead.
a list of lower, upper, eps to be passed
onto an R integration function. If one random effect is specified, the built-in R
integration function integrate is used. If two random effects are
specified,
R function adaptIntegrate from package cubature is used to do
the integration.
type of baseline distribution. It can be one of "exponential",
"weibull", or "piecewise", where "piecewise" stands for piecewise constant
hazard distribution. The default is "exponential".
arguments for baseline distribution
when it is piecewise constant hazard distribution. They are respectively
the number of pieces, the cut points to form the pieces and how the pieces
are formed. piececut should only include the interior time points
and the length of piececut should be equal to npiece - 1.
There are two ways to specify the piecewise constant hazard
distribution: specify piececut or specify npiece and
piececuttype. There are two possible types for piececuttype:
"quantile" and "even". "quantile" is the default
if not specified.
if TRUE, output model matrix instead of fitting the model
if TRUE, output corresponding matrix in the model matrix
a logical value. If TRUE, evaluate the likelihood function at initial values instead of fitting the model
for debug purpose
an object of class intcure is returned. It includes all the values
returned from optim() in addition to the following values:
The call to intcure
The baseline distribution fitted
The optimization method used
Sample size
This package depends on cubature package for numerical
integration and mvtnorm package. Better initial values for bt,
gm and basepara obtained
from a mixture cure model without random effects may help speed up the
program or finding the best estimates.
Peng, Y. and Taylor, J. M. G. Mixture cure model with random effects for the analysis of a multi-centre tonsil cancer study. Statistics in Medicine, 30:211-223, 2011
# NOT RUN {
data(simdata)
intcure(Surv(time, cens) ~ rx + cluster(id), ~ rx, data = simdata,
basedist = "weibull", sigma = c(-1, NA, NA), optimcfg = list(maxit = 1000))
# }
Run the code above in your browser using DataLab