Description Usage Arguments Details Value Note Author(s) See Also Examples
Ten fold cross validation for crr endpoint
1 |
fit |
a competing risks regression model fittd by function
|
time |
the expected time point. |
lps |
logical flag. If true, values of predicted X beta will be output instead of cumulative incidence |
fold |
number of fold. the default is 10 fold cross validation. |
Do cross validation on a competing risk regression model.
A vector of predicted values of cumulative incidence or X beta for each observation.
Before the function is called, packages 'Hmisc', 'rms' and 'cmprsk' should be loaded as the function will call some funcitons in these packages.
Changhong Yu, Michael Kattan, Ph.D
Department of Quantitative
Health Sciences
Cleveland Clinic
1 2 3 4 5 6 7 8 9 10 11 12 | 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)
## ten fold cross validation
prostate.dat$preds.tenf<-
tenf.crr(prostate.crr,time = 120)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.