intcure: Mixture cure models with random effects

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/intcure.r

Description

Fit mixture cure models with random effects based on numerical integration.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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")
)

Arguments

formula

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.

cureform

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.

data, subset, na.action

standard arguments for R model functions

bt

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

gm

a vector of initial value of gamma in the incidence model. It is optional

basepara

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.

sigma

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

optimcfg

a list of method, maxit, reltol, hessian, ndeps arguments for R function optim(). The default optimization method is Nelder-Mead.

intcfg

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.

basedist

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".

npiece, piececut, piececuttype

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.

model

if TRUE, output model matrix instead of fitting the model

y, x, z

if TRUE, output corresponding matrix in the model matrix

funval

a logical value. If TRUE, evaluate the likelihood function at initial values instead of fitting the model

debug

for debug purpose

Details

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.

Value

an object of class intcure is returned. It includes all the values returned from optim() in addition to the following values:

call

The call to intcure

basedist

The baseline distribution fitted

method

The optimization method used

n

Sample size

Author(s)

Yingwei Peng

References

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

See Also

survreg, coxph, glm

Examples

1
2
3
data(simdata)
intcure(Surv(time, cens) ~ rx + cluster(id), ~ rx, data = simdata,
basedist = "weibull", sigma = c(-1, NA, NA), optimcfg = list(maxit = 1000))

intcure documentation built on July 2, 2020, 12:25 a.m.