get_c_stat: Calculate C-statistics

Description Usage Arguments Value Examples

View source: R/get_c_stat.R

Description

Wrapper around the Inf.Cval function from the survC1 R package to calculate C-statistics.

Usage

1
get_c_stat(in.df, endpoint, endpoint.code, prog.factor, tau.val)

Arguments

in.df

data.frame containing all the input data.

endpoint

Column name of endpoint.

endpoint.code

Column name of endpoint code.

prog.factor

Column name of the prognostic factor to test.

tau.val

Vector of tau values to be used for C-statistics inference.

Value

data.frame containing the c-statistic, 95

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# Example taken from survC1
## Not run: 
library("survival")
in.df <- survC1::CompCase(pbc[1:200, c(2:4,10:14)])
in.df[, 2] <- as.numeric(in.df[,2]==2)
tau <- 365.25*8
prog.factor <- c("trt", "edema", "bili", "chol", "albumin", "copper")
get_c_stat(in.df, "time", "status", prog.factor, tau)

## End(Not run)

survutils documentation built on July 23, 2018, 1:02 a.m.