Description Usage Arguments Value Examples
Make a pretty cox model table.
1 2 |
cox.model |
A cox object |
rownames |
(optional) The row names to put on the table; defaults to what summary() does. Must be a character vector |
caption.prefix |
(optional) A string to put in front of the caption. By default, the caption contains N, N_events, and N_missing. |
print.xtable |
If TRUE, prints the cox table created as an xtable object. If FALSE (the default), it simply returns the table. |
digits |
If print.xtable is TRUE, how many digits should each column have? Note that the p-value is automatically converted to scientific notation where appropriate. |
If print.xtable is FALSE, a table of cox model estimates, SEs, Z-scores, p-values, hazard ratios, and confidence intervals.
1 2 3 4 5 | library(survival)
model <- coxph(Surv(time_to_fu, status_fu) ~ likes_pizza, data = pizza.data)
coxtable(model, "Likes Pizza", "Unadjusted Cox Model.", TRUE, 3)
model <- coxph(Surv(time_to_fu, status_fu) ~ likes_pizza + fav_flavor, data = pizza.data)
coxtable(model, c("Likes Pizza", "Pepperoni", "Sausage"), "Adjusted Cox Model.", TRUE, 3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.