| km_estimates {psfmi} | R Documentation |
Kaplan-Meier risk estimates for Net Reclassification Index analysis
Description
km_estimates Kaplan-Meier risk estimates for Net Reclassification Index analysis
for Cox Regression Models
Usage
km_estimates(data, p0, p1, time, status, t_risk, cutoff)
Arguments
data |
Data frame with relevant predictors |
p0 |
risk outcome probabilities for reference model. |
p1 |
risk outcome probabilities for new model. |
time |
Character vector. Name of time variable. |
status |
Character vector. Name of status variable. |
t_risk |
Follow-up value to calculate cases, controls. See details. |
cutoff |
A numerical vector that defines the outcome probability cutoff values. |
Details
Follow-up for which cases and controls are determined. For censored cases before this follow-up
the expected risk of being a case is calculated by using the Kaplan-Meier value to calculate
the expected number of cases. These expected numbers are used to calculate the NRI proportions.
(These are not shown by function nricens).
Value
An object from which the following objects can be extracted:
-
datadataset. -
prob_origoutcome risk probabilities at t_risk for reference model. -
prob_newoutcome risk probabilities at t_risk for new model. -
timename of time variable. -
statusname of status variable. -
cutoffcutoff value for survival probability. -
t_riskfollow-up time used to calculate outcome (risk) probabilities. -
reclass_totalstable with total reclassification numbers. -
reclass_casestable with reclassification numbers for cases. -
reclass_controlstable with reclassification numbers for controls. -
totalstotals of controls, cases, censored cases. -
km_esttotals of cases calculated using Kaplan-Meiers risk estimates. -
nri_estreclassification measures.
Author(s)
Martijn Heymans, 2023
References
Cook NR, Ridker PM. Advances in measuring the effect of individual predictors of cardiovascular risk: the role of reclassification measures. Ann Intern Med. 2009;150(11):795-802.
Steyerberg EW, Pencina MJ. Reclassification calculations for persons with incomplete follow-up. Ann Intern Med. 2010;152(3):195-6 (author reply 196-7).
Pencina MJ, D'Agostino RB Sr, Steyerberg EW. Extensions of net reclassification improvement calculations to measure usefulness of new biomarkers. Stat Med. 2011;30(1):11-21
Inoue E (2018). nricens: NRI for Risk Prediction Models with Time to Event and Binary Response Data. R package version 1.6, <https://CRAN.R-project.org/package=nricens>.
Examples
library(survival)
lbpmicox1 <- subset(psfmi::lbpmicox, Impnr==1) # extract dataset
fit_cox0 <-
coxph(Surv(Time, Status) ~ Duration + Pain, data=lbpmicox1, x=TRUE)
fit_cox1 <-
coxph(Surv(Time, Status) ~ Duration + Pain + Function + Radiation,
data=lbpmicox1, x=TRUE)
p0 <- risk_coxph(fit_cox0, t_risk=80)
p1 <- risk_coxph(fit_cox1, t_risk=80)
res_km <- km_estimates(data=lbpmicox1,
p0=p0,
p1=p1,
time = "Time",
status = "Status",
cutoff=0.45,
t_risk=80)