coxdual {coxinterval}  R Documentation 
Fit a Cox model to a progressive Markov illnessdeath process observed under rightcensored survival times and interval or rightcensored progression times.
coxdual(formula, data = parent.frame(), subset, init = NULL, formula.coxph = NULL, init.coxph = FALSE, control, ...)
formula 
an expression of the form 
data 
an optional data frame in which to interpret the variables named in
the arguments 
subset 
expression specifying which rows of 
init 
a named list of the vector 
formula.coxph 
an optional formula specifying a model to fit with

init.coxph 
a logical value indicating that 
control 
a named list of parameters controlling the model fit, returned by
the function 
... 
additional arguments to be passed to 
A valid formula
argument can be expressed
as
Surv(<start>, <stop>, <status>) ~ cluster(<id>) + trans(<from>, <to>) + <covariate terms>
where (<start>
, <stop>
] is largest known time
interval over which individual <id>
is at risk for a transition
between the states <from>
and <to>
. The variable
<status>
indicates whether or not a transition is observed to
occur at <stop>
.
Under dual censoring (Boruvka and Cook, 2014), both the originating
state and the left endpoint of an atrisk interval may be unknown.
This case is handled with <start> = NA
, <from> = NA
,
<to>
equal to the index of the terminal state, and any
transitiontype–specific covariates taking on the values assumed when
<from>
is equal to the intermediate state index. Under
discrete observation of nonterminal events, the rightendpoint of
some atrisk intervals may be unknown. For these <start>
is
the initial observation time (zero, unless lefttruncated),
<stop> = NA
and <from>
is equal to the initial state
index. Missing values are retained by the NA
action
na.coxdual
. The default NA
action is used to
handle any missing values passed to coxph
via
the arguments formula.coxph
or init.coxph
.
Dual censoring typically arises in two scenarios: (1) dual
rightcensoring, where intermediate events are rightcensored before
terminal events, and (2) intervalcensored 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 partition with size controlled by
arguments passed to coxdual.control
. This approach
requires that both types of transitions to the terminal state are, at
least for some subjects, observed exactly.
An object of the classes "coxinterval"
and "coxdual"
,
which is a list with the following components.
call 
the matched call to 
censor 
a string indicating the dual censoring type. The value "right" corresponds to strictly dualright–censored data. All other cases return "interval". 
n 
size of the sample used in the model fit. 
m 
number of atrisk intervals used in the model fit. 
p 
number of regression coefficients. 
coef 
a named 
var 
a named 
basehaz 
a data frame giving the cumulative baseline transition intensities evaluated over the sieve partition. 
init 
list of initial values used in the model fit. 
loglik 
a vector giving the loglikelihood at initiation and each iteration. 
iter 
number of iterations needed to reach the stopping criteria. 
gradnorm 
the maximum norm of the score scaled by the parameter value at the final iteration. 
maxnorm 
the maximum norm of the difference between the penultimate and final parameter values. 
cputime 
the processing time used for parameter and variance estimation. 
fit.coxph 
the 
na.action 
the 
censor.rate 
a named vector of censoring rates. 
control 
a list of arguments passed to 
data 
a list containing the data relevant to the model fit, if the

Boruvka, A. and Cook, R. J. (2014) Sieve estimation in a Markov illnessdeath process under dual censoring.
cluster
, dualic
,
dualrc
, Surv
,
trans
# Fit Cox model to dualrightcensored data fit < coxdual(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 intervalcensored progression times fit < coxdual(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)))