Learn R Programming

survC1 (version 1.0-3)

survC1-package: C-Statistics for Risk Prediction Models with Censored Survival Data

Description

Performes inference of overall adequecy of risk prediction models with censored survival data.

Arguments

Details

Package: survC1
Type: Package
Version: 1.0-3
Date: 2021-02-10
License: GPL-2
LazyLoad: yes

Performs inference for C of risk prediction models with censored survival data, using the method proposed by Uno et al. (2011). Inference for the difference in C between two competing prediction models is also implemented.

References

Hajime Uno, Tianxi Cai, Michael J. Pencina, Ralph B. D'Agostino, and LJ Wei. On the C-statistics for evaluating overall adequacy of risk prediction procedures with censored survival data. Statistics in Medicine 2011, 30:1105-16. doi:10.1002/sim.4154

Examples

Run this code
# NOT RUN {
#==============================================
# read sample data (PBC in survival package)
#==============================================
D=CompCase(pbc[1:200,c(2:4,10:14)]) 
D[,2]=as.numeric(D[,2]==2)

#==============================================
# Inference of C
#==============================================
tau=365.25*8
C=Inf.Cval(D, tau, itr=200)
round(c(C$Dhat, C$se, C$low95, C$upp95), digits=3)

#==============================================
# Inference of Delta C between 2 models
#==============================================
model0<-D[,c(1:2,4:5)] ; 
model1<-D
covs1<-as.matrix(model1[,c(-1,-2)])
covs0<-as.matrix(model0[,c(-1,-2)])

Delta=Inf.Cval.Delta(model0[,1:2], covs0, covs1, tau, itr=200)
round(Delta, digits=3)

#==============================================
# Point estimation via cross-validation
#==============================================
model1=D[,c(1,2,4)]

cvC(model1,tau,cvK=2,Rep=10)
    
# }

Run the code above in your browser using DataLab