| lunnmcneil | R Documentation |
Estimates covariate effects on \omega^{+} (the ratio of the hazard for
the event of interest to the hazard for the competing event) from a single
stacked ("augmented") model, following Lunn and McNeil (1995). Each subject
contributes one record per event type; the model is stratified by event type
and the covariate-by-event-type interaction estimates
\log(\omega^{+}\text{ ratio}) with model-based standard errors,
per-covariate Wald tests, and an omnibus multivariate Wald test.
lunnmcneil() is the estimation engine behind gcecox and
gcefg; use it directly when only the coefficient table and
tests are needed, and the GCE fitters when the risk score, predictions, and
displays are wanted as well.
lunnmcneil(formula, ...)
## S3 method for class 'formula'
lunnmcneil(
formula,
data,
subset,
na.action,
event = NULL,
competing = NULL,
type = c("coxph", "finegray"),
cluster.se = TRUE,
conf.level = 0.95,
standardize = FALSE,
se = c("robust", "boot"),
B = 200,
contrasts = NULL,
...
)
## Default S3 method:
lunnmcneil(
formula,
cause,
Cov,
event = 1,
competing = 2,
type = c("coxph", "finegray"),
cluster.se = TRUE,
conf.level = 0.95,
standardize = FALSE,
se = c("robust", "boot"),
B = 200,
...
)
formula |
a formula with a |
... |
passed to |
data |
a data frame in which the formula is evaluated. |
subset, na.action |
as in |
event |
code (or factor level) marking the event of interest. |
competing |
code (or factor level) marking the competing event. |
type |
|
cluster.se |
logical; cluster-robust (subject) SEs (default |
conf.level |
confidence level (default |
standardize |
logical; controls only the reported coefficient
scale (default |
se |
standard-error method: |
B |
number of bootstrap resamples when |
contrasts |
optional contrasts specification passed to
|
cause |
(default method) event indicator per subject: |
Cov |
(default method) a data frame of covariates (factors are expanded to indicators). |
Two hazard scales are supported:
type = "coxph"Cause-specific hazards. The augmented data set
duplicates each subject into an "event" stratum and a "competing" stratum;
the interaction coefficient is exactly the difference in cause-specific
log-hazards, i.e. \log(\omega^{+}). This is the original Lunn-McNeil
construction and the interaction MLE equals the difference of two separate
cause-specific Cox fits.
type = "finegray"Subdistribution hazards. Risk-set-weighted
data are generated for each event type with
finegray, stacked, and fit with a single weighted,
event-type-stratified coxph. The interaction
estimates the difference in subdistribution log-hazards. Because subjects
recur across the weighted risk sets, cluster-robust (subject) standard
errors are used. This is an extension of Lunn-McNeil to the
subdistribution scale.
Subject records are duplicated in both cases, so cluster-robust standard errors (clustered on subject) are the default.
An object of class "gce_lunnmcneil": a list with the fitted
stacked model ($fit), the omega+ coefficient table
($omegaplus), the coefficient vector and its covariance matrix on
the reported scale ($coef, $var), the reference
(competing-event) coefficients ($beta_competing), the omnibus test
($omnibus), the model terms, xlevels,
contrasts and formula, and the hazard scale ($type).
Methods are available for print, summary, coef,
vcov, confint, nobs, logLik, formula,
and terms.
The formula method is the recommended interface. The response is written
Surv(time, status), where status is either numeric with
0 = censored and the codes given by event and competing
(defaults 1 and 2), or a factor whose first level denotes
censoring (the convention of Surv for multi-state
data), in which case event and competing default to the second
and third levels. The right-hand side accepts the usual model-formula
syntax (factors, interactions, transformations, splines). The model terms,
factor levels, and contrasts are stored in the fitted object.
The default method is the matrix interface of earlier versions
(lunnmcneil(Time, cause, Cov)); it is retained for backward
compatibility and returns the same object.
Lunn M, McNeil D (1995) Applying Cox regression to competing risks. Biometrics 51:524-32.
gcecox, gcefg,
gcemod-methods
data(hn)
fit <- lunnmcneil(Surv(time, status) ~ age + smoker + t_cat + n_cat + p16,
data = hn)
fit
summary(fit)
confint(fit)
# subdistribution scale
lunnmcneil(Surv(time, status) ~ age + smoker + p16, data = hn,
type = "finegray")
# matrix interface
lunnmcneil(hn$time, hn$status, hn[, c("age", "smoker", "p16")])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.