Description Usage Arguments Details Examples
Extract a subset of the Cox proportional hazard output values and format in report-ready table.
1 | extractCox(cox)
|
cox |
The infection status variable assumed to be the last covariate in list.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (cox)
{
dpl <- 3
lastRow <- nrow(coef(cox))
beta <- round(coef(cox)[lastRow, "coef"], dpl)
se <- round(coef(cox)[lastRow, "se(coef)"], dpl)
p <- round(coef(cox)[lastRow, "Pr(>|z|)"], dpl)
CI <- round(cox$conf.int[lastRow, c("lower .95", "upper .95")],
dpl)
res <- cbind(beta, `exp(beta)` = round(exp(beta), 3), CI[1],
CI[2], p)
res
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.