Inf.Cval: Inference of C

Description Usage Arguments Value Examples

View source: R/FUN-cstat-ver003b.R

Description

Performes the inference for C

Usage

1
Inf.Cval(mydata, tau, itr = 1000, seed = NULL)

Arguments

mydata

Input data. The 1st column should be time-to-event, and the 2nd column is event indicator (1=event, 0=censor). The rest of the columns are covariates/predictors used in the model. No character variable or missing is allowed.

tau

Truncation time. The resulting C tells how well the given prediction model works in predicting events that occur in the time range from 0 to tau. Note that the survival function for the underlying censoring time distribution needs to be positive at tau.

itr

Iteration of perturbation-resampling.

seed

A seed for generating random numbers for the resampling. The default is NULL.

Value

Dhat

Estimate for C

se

Standard error estiamte

low95

Lower limit of a 0.95 two-sided confidence interval for C

upp95

Upper limit of a 0.95 two-sided confidence interval for C

ft

coxph object with the fitted model

Examples

1
2
3
4
5
6
7
D=CompCase(pbc[1:200,c(2:4,10:14)]) 
D[,2]=as.numeric(D[,2]==2)

tau=365.25*8

C=Inf.Cval(D, tau, itr=200)
round(c(C$Dhat, C$se, C$low95, C$upp95), digits=3)

survC1 documentation built on May 29, 2017, 9:50 a.m.