Description Usage Arguments Value Examples
Wrapper around the Inf.Cval function from the survC1 R package to calculate C-statistics.
1 | get_c_stat(in.df, endpoint, endpoint.code, prog.factor, tau.val)
|
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. |
data.frame containing the c-statistic, 95
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.