Learn R Programming

survC (version 0.1.0)

cindex_calc: Calculate Harrell's C-index with 95% CI

Description

Calculate Harrell's C-index with 95% CI

Usage

cindex_calc(model, newdata = NULL, digits = 3)

Value

numeric vector of C-index (lower, upper)

Arguments

model

a 'coxph' object

newdata

optional validation dataset

digits

number of decimal places for rounding (default 3).

Examples

Run this code
library(survival)
fit <- coxph(Surv(time, status) ~ age + sex, data = lung)
cindex_calc(fit)



Run the code above in your browser using DataLab