Description Usage Arguments Value Examples
Easy to perform integrated discrimination improvement index (IDI) for logistic and cox regression.
1 2 3 4 5 6 7 8 9 10 |
f1 |
base model |
f2 |
the other model |
... |
ignore |
timepoint |
one time point for cox regression, default is median time. |
IDI results
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | library(rms)
# logistic
data(lung)
lung$status=lung$status-1
f1=lrm(status~age+sex,lung)
f2=lrm(status~age+sex+ph.ecog,lung)
idi(f1,f2)
# survival
head(lung)
range(lung$time)
lung=lung[complete.cases(lung),]
f1=cph(Surv(time,status)~age+sex,lung)
f2=cph(Surv(time,status)~age+sex+ph.ecog,lung)
idi(f1,f2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.