Newlevels.cmprsk {QHScrnomo}R Documentation

Change the Level Labels of Categorical Predictors for a Competing Risks Regression Model

Description

Uses the Newlevels function to change the labels predictors when constructing a nomogram.

Usage

## S3 method for class 'cmprsk'
Newlevels(fit, levels, ...)

Arguments

fit

A model fit by crr.fit

levels

A list of named vectors specifying the new level labels for categorical predictors.

...

Other arguments for Newlevels

Value

A new crr.fit object with adjusted labels on the factor levels

Note

This will override parms and datadist information that were stored with the fit.

Author(s)

Changhong Yu. Department of Quantitative Health Sciences, Cleveland Clinic

See Also

Newlabels.cmprsk

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 <- Newlevels(prostate.crr, list(TX = c('Treatment 1', 'Treatment 2', 'Treatment 3')))


[Package QHScrnomo version 3.0.1 Index]