Learn R Programming

coxinterval (version 1.0)

coxic: Cox model for a Markov illness-death process under dual censoring

Description

Fit a Cox model to a progressive Markov illness-death process observed under right-censored survival times and interval- or right-censored progression times.

Usage

coxic(formula, data = parent.frame(), subset, init = NULL,
      formula.coxph = NULL, init.coxph = FALSE, control, ...)

Arguments

formula
an expression of the form response ~ terms, where response is a survival object returned by the Surv function and terms contain clustering and state-t
data
an optional data frame in which to interpret the variables named in the arguments formula and formula.coxph.
subset
expression specifying which rows of data should be used in the fit. All observations are included by default.
init
a named list of the vector coef, specifying the initial coefficient values, and matrix or data frame basehaz, on which to base the initial cumulative baseline transition intensities. The basehaz element
formula.coxph
a list of formula objects specifying models to fit with coxph using singly right-censored observations in data. The shorthand . indicates the same terms given in
init.coxph
a logical value indicating that init should be overrided by estimates based on the coxph fit to the first model specified in formula.coxph.
control
a named list of parameters controlling the model fit, returned by the function coxic.control. This defaults to coxic.control().
...
additional arguments to be passed to coxic.control.

Value

  • An object of the classes "coxinterval" and "coxic", which is a list with the following components.
  • callthe matched call to coxic.
  • censora string indicating the dual censoring type. The value "right" corresponds to strictly dual right-censored data. All other cases return "interval".
  • nsize of the sample used in the model fit.
  • mnumber of at-risk intervals used in the model fit.
  • pnumber of regression coefficients.
  • coefa named p vector of regression coefficients.
  • vara named p by p covariance matrix of the regression coefficients.
  • basehaza data frame giving the cumulative baseline transition intensities evaluated over the sieve.
  • initlist of initial values used in the model fit.
  • loglika vector giving the initial and final log-likelihood values.
  • iternumber of iterations needed to achieve the model fit.
  • gradnormthe maximum norm of the score function at the final parameter value.
  • maxnormthe maximum norm of the difference between the penultimate and final parameter values.
  • cputimethe processing time used for parameter and variance estimation.
  • fit.coxphan unnamed list whose components give the coxph fit to any models specified by the formula.coxph argument.
  • na.actionthe "na.action" attribute of the model frame. Here this corresponds to the result from the custom NA action na.coxic.
  • censor.ratea named vector of censoring rates.
  • controla list of arguments passed to coxic.control.

Details

A valid formula argument can be expressed as Surv(, , ) ~ cluster() + trans(, ) + where (, ] is largest known time interval over which individual is at risk for a transition between the states and . The variable indicates whether or not a transition is observed to occur at .

Under dual censoring (Boruvka and Cook, 2014b), both the originating state and the left endpoint of an at-risk interval may be unknown. This case is handled with = NA, = NA, equal to the index of the terminal state and any transition-type--specific covariates taking on the values assumed when is equal to the intermediate state index. Under discrete observation of non-terminal events, the right-endpoint of some at-risk intervals may be unknown. For these is the initial observation time (zero, unless left-truncated), = NA and is equal to the initial state index. Missing values are retained by the NA action na.coxic. The default NA action is used to handle any missing values passed to coxph.

Dual censoring typically arises in two scenarios: (1) dual right-censoring, where intermediate events are right-censored before terminal events, and (2) interval-censored intermediate events. For examples of these refer to dualrc and dualic, respectively.

A consequence of dual censoring is that any discrete maximum likelihood estimator has ambiguous support at any failure times associated with these NA values. To resolve this, the cumulative baseline transition intensities are restricted to piecewise linear functions on a sieve with size controlled by arguments passed to coxic.control. This approach requires that both types of transitions to the terminal state are, at least for some subjects, observed exactly.

References

Boruvka, A. and Cook, R. J. (2014b) Sieve estimation in a Markov illness-death process under dual censoring.

See Also

cluster, dualic, dualrc, Surv, trans

Examples

Run this code
# Fit Cox model to dual-right--censored data
fit <- coxic(Surv(start, stop, status) ~ cluster(id) + trans(from, to)
             + I(z * (to == 1)) + I(z * (from %in% 0 & to == 2))
             + I(z * (from %in% c(NA, 1) & to == 2)), data = dualrc,
             sieve.rate = 2/5)
fit
par(mfrow = c(1, 3))
by(fit$basehaz, fit$basehaz$trans, function(x) plot(x[, 2:1],
   type = "l", main = paste(x[1, 3]), xlim = c(0, 2), ylim = c(0, 4)))

# Fit Cox model to data with interval-censored progression times
fit <- coxic(Surv(start, stop, status) ~ cluster(id) + trans(from, to)
             + I(z * (to == 1)) + I(z * (from %in% 0 & to == 2))
             + I(z * (from %in% c(NA, 1) & to == 2)), data = dualic)
fit
par(mfrow=c(1, 3))
by(fit$basehaz, fit$basehaz$trans, function(x) plot(x[, 2:1],
   type = "l", main = paste(x[1, 3]), xlim = c(0, 2), ylim = c(0, 4)))

Run the code above in your browser using DataLab