Description Usage Arguments Value Note Author(s) References See Also Examples
This function uses the crr
function in
the cmprsk
package to construct a competing risk regression object.
1 | crr.fit(fit, cencode = 0, failcode = 1)
|
fit |
a Cox proportional hazards regression model constructed from
|
cencode |
the value of the status indicator that indicates a censored observation |
failcode |
the value of the status indicator that indicates an event of interest |
Returns a list of class cmprsk, with components:
coef |
the estimated regression coefficients |
loglik |
log pseudo-liklihood evaluated at coef |
lscore |
derivitives of the log pseudo-likelihood evaluated at coef |
inf |
-second derivatives of the log pseudo-likelihood |
var |
estimated variance covariance matrix of coef |
res |
matrix of residuals giving the contribution to each score (columns) at each unique failure time (rows) |
uftime |
vector of unique failure times |
bfitj |
jumps in the Breslow-type estimate of the underlying sub-distribution cumulative hazard (used by predict.crr()) |
tfs |
the tfs matrix (output of tf(), if used) |
converged |
TRUE if the iterative algorithm converged. |
cencode |
the value of the status indicator that indicates a censored observation |
failcode |
the value of the status indicator that indicates an event of interest |
cph.f |
regular survival model fitted by cph which is saved for
function |
cphdat |
data used for cph model, where all
predictors are represented in numeric format, which is used by function
|
This function requires that the rms and cmprsk libraries are attached.
Michael W. Kattan, Ph.D. and Changhong Yu. Department of Quantitative Health Sciences, Cleveland Clinic
Michael W. Kattan, Glenn Heller and Murray F. Brennan (2003). A
competing-risks nomogram for sarcoma-specific death following local
recurrence. Statistics in Medicine. Stat Med
. 2003;22:3515-3525.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | 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)
## anova test
anova(prostate.crr)
## hazards ratio
summary(prostate.crr)
## ten fold cross validation
prostate.dat$preds.tenf.cv.prostate.crr.120 <-
tenf.crr(prostate.crr,time = 120)
## make a CRR nomogram
nomogram.crr(prostate.crr,failtime = 120,lp=FALSE,
funlabel = "Predicted 10-year cumulative incidence")
## calculate the CRR version of concordance index
with(prostate.dat, cindex(preds.tenf.cv.prostate.crr.120 ,
ftime = TIME_EVENT,
fstatus =EVENT_DOD, type = "crr"))["cindex"]
## generate the calibration curve for predicted 10-year cancer
## specific mortality
with(prostate.dat,
groupci(preds.tenf.cv.prostate.crr.120 , ftime = TIME_EVENT,
fstatus =EVENT_DOD, g = 5, u = 120,
xlab = "Nomogram predicted 10-year cancerspecific mortality",
ylab = "Observed predicted 10-year cancerspecific mortality")
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.