predict.cmprsk: Calculate Predicted Competing Risks Probability

Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/predict.cmprsk.R

Description

Calculate Predicted Competing Risks Probability.

Usage

1
2
3
## S3 method for class 'cmprsk'
predict(object, newdata = NULL, time, 
lps = FALSE, ...)

Arguments

object

a saved crr model fit crated by function crr.fit

newdata

data frame for prediction. Each row of the data frame contains values of covariates that are required in the crr model. If missing, the original data set that was used to develop the crr model will be used for prediction.

time

expected time point for evaluating the competing risks probability.

lps

set TRUE to return linear predictor values instead of failure probabilities.

Details

Calculate predicted probabilities for a competing risks regression model, which is fitted by function crr.fit.

Value

A vector with the length equal to the number of rows in the data frame, which was used to make prediction. Each element corresponds to a predicted failure probability at the expected time point.

Note

This function is adapted from function predict.crr in package cmprsk.

Author(s)

Michael W. Kattan, Ph.D. and Changhong Yu.
Department of Quantitative Health Sciences, Cleveland Clinic

References

Fine JP and Gray RJ (1999) A proportional hazards model for the subdistribution of a competing risk. JASA 94:496-509.

See Also

crr.fit, predict.crr

Examples

1
2
3
4
5
6
7
8
9
data(prostate.dat)
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.dat$pred.60 <- predict.cmprsk(prostate.crr, time=60)

jixccf/QHScrnomo documentation built on Dec. 21, 2021, 12:08 a.m.