sas.cmprsk {QHScrnomo}R Documentation

Generate a Prediction Equation for a Competing Risks Regression Model

Description

Uses Function to generate and print the linear predictor to the console or file which can be hard-coded into a function for evaluation on the scale of the original data. A time point can optionally be specified to retrieve the base sub-cumulative rate at that time point (i.e, the failure probability when all covariate values are 0).

Usage

sas.cmprsk(f, time = NA, baseonly = FALSE, file = "", append = FALSE)

Arguments

f

A model fit by crr.fit

time

A single time point to calculate the failure probability

baseonly

Should we only display the failure probability at the specified time? Defaults to FALSE.

file

An optional connection or character string naming the file to print to.

append

Only used if the file argument is specified. If TRUE, the output will be appended to file, otherwise it will overwritten.

Value

A printed equation using cat (invisible NULL)

Author(s)

Changhong Yu. Department of Quantitative Health Sciences, Cleveland Clinic

See Also

crr.fit sascode Function

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)
sas.cmprsk(prostate.crr, time = 60)


[Package QHScrnomo version 3.0.1 Index]