km_estimates: Kaplan-Meier risk estimates for Net Reclassification Index...

View source: R/km_estimates.R

km_estimatesR 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:

  • data dataset.

  • prob_orig outcome risk probabilities at t_risk for reference model.

  • prob_new outcome risk probabilities at t_risk for new model.

  • time name of time variable.

  • status name of status variable.

  • cutoff cutoff value for survival probability.

  • t_risk follow-up time used to calculate outcome (risk) probabilities.

  • reclass_totals table with total reclassification numbers.

  • reclass_cases table with reclassification numbers for cases.

  • reclass_controls table with reclassification numbers for controls.

  • totals totals of controls, cases, censored cases.

  • km_est totals of cases calculated using Kaplan-Meiers risk estimates.

  • nri_est reclassification 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)


psfmi documentation built on July 9, 2023, 7:02 p.m.