coxaalenic(formula, data = parent.frame(), subset, init = NULL,
formula.timereg = NULL, init.timereg = FALSE,
close.cplex = TRUE, control, ...)
response ~ terms
, where
response
is a survival object returned by the
Surv
function and terms
contains at
least one multipliformula
and formula.timereg
.data
should be used
in the fit. All observations are included by default.coef
and basehaz
. The
coef
element should be a scalar or vector specifying the
initial values of the multiplicative regression coefficient. If
init = NULL
or cox.aalen
function using right-censored observations in data
. Here the
shoinit
should be overrided by
estimates based on the cox.aalen
fit to the
first model in formula.timereg
.coxaalenic
exits.coxaalenic.control
. This defaults to
coxaalenic.control()
.coxaalenic.control
."coxinterval"
and "coxaalenic"
,
which is a list with the following components.coxic
.p
vector of regression coefficients.p
by p
covariance matrix of the regression
coefficients.cox.aalen
fit to any models specified by the
formula.timereg
argument."na.action"
attribute of the model frame.coxic.control
.formula
argument can be expressed
as Surv(
,
] is the censoring interval for
the survival time. Following the type = "interval2"
censoring for the
Surv
function, we use the convention that any
right-censoring times are provided in the variable
and
is set to the NA
value. Terms in the formula
have either time-varying additive effects
on the survival hazard as in Aalen's additive regression model, or
fixed multiplicative effects as in the Cox model. Multiplicative terms
are distinguished by applying prop
function to each corresponding variable.
coxaalenic
requires C functions, which are loaded only if
coxinterval
is installed from source on a system with
Martinussen, T. and Scheike, T. H. (2006) Dynamic Regression Models for Survival Data. New York: Springer.
Scheike, T. H. and Zhang, M.-J. (2002)
cox.aalen
, prop
,
Surv
# Fit a Cox model to the breast cosmesis dataset
if (is.loaded("coxaalenic", "coxinterval")) {
fit <- coxaalenic(Surv(left, right, type = "interval2") ~ prop(treat),
data = cosmesis)
fit
plot(fit$basehaz, type = "s")
}
Run the code above in your browser using DataLab