get_c_stat: Calculate C-statistics

Description Usage Arguments Value Examples

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)

Example output

Endpoint: time
Endpoint code: status
Prognostic Factor: trt, edema, bili, chol, albumin, copper
   tau    c_stat     low95     upp95         se
1 2922 0.7758382 0.7226755 0.8290008 0.02713763

survutils documentation built on May 2, 2019, 6:38 a.m.