Newlabels.cmprsk {QHScrnomo} | R Documentation |
Change the Predictor Labels for a Competing Risks Regression Model
Description
Uses the Newlabels
function to change the labels predictors when constructing a nomogram.
Usage
## S3 method for class 'cmprsk'
Newlabels(fit, labels, ...)
Arguments
fit |
A model fit by |
labels |
A character vector specifying the new labels for variables in a fit. |
... |
Other arguments for |
Details
To give new labels for all variables, you can specify labels of the
form labels = c("Age in Years","Cholesterol")
, where the list of new labels
is assumed to be the length of all main effect-type variables in the fit
and in their original order in the model formula. You may specify a named
vector to give new labels in any order for a subset of the variables,
e.g., labels = c(age = "Age in Years", chol = "Cholesterol")
.
Value
A new crr.fit
object with adjusted labels
Author(s)
Changhong Yu. Department of Quantitative Health Sciences, Cleveland Clinic
See Also
Examples
dd <- datadist(prostate.dat)
options(datadist = "dd")
prostate.f <- cph(Surv(TIME_EVENT,EVENT_DOD == 1) ~ TX + rcs(PSA,3) +
BX_GLSN_CAT + CLIN_STG + rcs(AGE,3) +
RACE_AA, data = prostate.dat,
x = TRUE, y = TRUE, surv = TRUE,time.inc = 144)
prostate.crr <- crr.fit(prostate.f, cencode = 0, failcode = 1)
prostate.g <- Newlabels(
prostate.crr,
c(
TX = 'Treatment options',
BX_GLSN_CAT = 'Biopsy Gleason Score Sum',
CLIN_STG = 'Clinical stage'
)
)
[Package QHScrnomo version 3.0.1 Index]