| gcecox | R Documentation |
Fits a generalized competing event (GCE) model on the cause-specific hazard
scale and estimates covariate effects on \omega^{+} (event of interest
vs. competing event) using the Lunn-McNeil stacked model (see
lunnmcneil), with confidence intervals, Wald tests, and an
omnibus test. A GCE risk score is formed from the model linear predictor.
gcecox(formula, ...)
## S3 method for class 'formula'
gcecox(
formula,
data,
subset,
na.action,
t = NULL,
event = NULL,
competing = NULL,
conf.level = 0.95,
cluster.se = TRUE,
standardize = FALSE,
contrasts = NULL,
model = TRUE,
...
)
## Default S3 method:
gcecox(
formula,
Ind,
Cov,
M = NULL,
t = NULL,
conf.level = 0.95,
cluster.se = TRUE,
standardize = FALSE,
...
)
formula |
a formula with a |
... |
passed to |
data |
a data frame in which the formula is evaluated. |
subset, na.action |
as in |
t |
default readout time for time-dependent quantities. If |
event, competing |
code (or factor level) marking the event of interest
and the competing event; see |
conf.level |
confidence level (default |
cluster.se |
logical; cluster-robust SEs in the Lunn-McNeil model
(default |
standardize |
logical; controls only the reported omega+ ratio
scale (default |
contrasts |
optional contrasts specification passed to
|
model |
logical; keep the model frame in the fitted object (default
|
Ind |
(default method) a data frame of event indicators. Column 1 =
event of interest, column 2 = competing event ( |
Cov |
(default method) a data frame of covariates. |
M |
deprecated and ignored. The number of bins is now an argument of
the displays ( |
The model is specified with a formula whose response is
Surv(time, status); see the Interfaces section of
lunnmcneil for the accepted status codings. The fitted object
stores the model terms, factor levels, and contrasts, so that
predict() can evaluate the risk score and the
predicted \omega^{+} for new data.
Fitting does not depend on a time point. The argument t only sets the
default readout time for quantities that are functions of time: the
predicted absolute \omega^{+}(t) and \omega(t)
(predict(type = "ratio"), type = "share"), calibration
(gce_calibration), and the time axis of the displays. It can
be overridden in each of those functions.
The default method is the matrix interface of earlier versions,
gcecox(Time, Ind, Cov, t = ), retained for backward compatibility.
An object of class c("gcecox", "gcemod"). The components most
often needed are available through methods rather than by name; see
gcemod-methods (print, summary, coef,
vcov, confint, logLik, nobs, formula,
terms, model.frame, model.matrix, predict,
fitted, update, plot). The list also contains
coef and var (log omega+ ratios and their covariance matrix
on the reported scale), riskscore (mean-centered linear predictor),
omegaplus and omega (per-subject predictions at t),
omnibus, lunnmcneil (the stacked-model fit), scaling,
and the model terms, xlevels, contrasts, and
model frame.
gcefg, gcecif, lunnmcneil,
gcemod-methods, gce_cutpoints
data(hn)
fit <- gcecox(Surv(time, status) ~ age + smoker + t_cat + n_cat + p16,
data = hn)
fit
summary(fit)
confint(fit)
# risk score and predicted omega+ at 5 years for new subjects
predict(fit, newdata = hn[1:3, ], type = "lp")
predict(fit, newdata = hn[1:3, ], type = "ratio", times = 5)
# matrix interface
Ind <- data.frame(event = as.integer(hn$status == 1),
competing = as.integer(hn$status == 2))
gcecox(hn$time, Ind, hn[, c("age", "smoker", "p16")], t = 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.