Description Usage Arguments Details Value Note Author(s) See Also Examples
Cumulative Incidence Estimates vs. a Continuous Variable
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
x |
a continuous variable |
ftime |
vector of follow-up time |
fstatus |
vector of failure status |
cencode |
value indicating cencering. |
failcode |
value indicating event of interest |
ci |
logical flag to output event free probability if setting
|
m |
desired minimum number of observations in a group |
g |
number of quantile groups |
cuts |
actual cuts in |
u |
time for which to estimate cumulative incidence |
pl |
TRUE to plot results |
conf.int |
defaults to |
xlab |
if |
ylab |
if |
xlim |
range of x axis |
ylim |
range of y axis |
lty |
line time for primary line connecting estimates |
add |
set to |
cex.subtitle |
character size for subtitle. Default is |
ab |
|
... |
plotting parameters to pass to the plot and errbar functions |
Function to divide a continuous variable x (e.g. age, or predicted
cumulative incidence at time u created by
predict.cmprsk into g quantile groups, get
cumulative incidence estimates at time u (a scaler), and to return a
matrix with columns x=mean x in quantile, n=number of
subjects, events=no. events, and ci= cumulattive incidence at
time u, std.err = standard error. Instead of supplying
g, the user can supply the minimum number of subjects to have in the
quantile group (m, default=50). If cuts is given (e.g.
cuts=c(0,.1,.2,...{},.9,.1)), it overrides m and g.
matrix with columns named x (mean predictor value in
interval), n (sample size in interval), events (number of
events in interval), ci (cumulative incidence estimate),
std.err (standard error of cumulative incidence)
This function is adapted from Harrell's function
groupkm.
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 13 14 15 16 17 18 19 | 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.cv.prostate.crr.120 <-
tenf.crr(prostate.crr,time = 120)
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.