Description Usage Arguments Details Value Note Author(s) References See Also Examples
View source: R/predict.cmprsk.R
Calculate Predicted Competing Risks Probability.
1 2 3 |
object |
a saved crr model fit crated by function
|
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 |
Calculate predicted probabilities for a competing risks regression model,
which is fitted by function crr.fit
.
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.
This function is adapted from function
predict.crr
in package cmprsk
.
Michael W. Kattan, Ph.D. and Changhong Yu.
Department of
Quantitative Health Sciences, Cleveland Clinic
Fine JP and Gray RJ (1999)
A proportional hazards model
for the subdistribution of a competing risk. JASA
94:496-509.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.