toHR | R Documentation |
toHR(fit, digits = 2)
fit |
an object of class coxph representing the fit. See coxph.object for details. |
digits |
integer indicating the number of decimal places (round) or significant digits (signif) to be used. Negative values are allowed (see Details). |
test1 <- list(time=c(4,3,1,1,2,2,3),
status=c(1,1,1,0,1,1,0),
x=c(0,2,1,1,1,0,0),
sex=c(0,0,0,0,1,1,1))
# Fit a stratified model
coxph.ex = coxph(Surv(time, status) ~ x + strata(sex), test1)
toHR(coxph.ex, digits = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.