ezcox_group | R Documentation |
Group Cox Analysis and Visualization
ezcox_group(
data,
grp_var,
covariate,
controls = NULL,
time = "time",
status = "status",
sort = FALSE,
decreasing = TRUE,
add_all = FALSE,
add_caption = TRUE,
verbose = TRUE,
headings = list(variable = "Group", n = "N", measure = "Hazard ratio", ci = NULL, p =
"p"),
...
)
data |
a |
grp_var |
a group column. |
covariate |
a covariable for cox analysis. |
controls |
column names specifying controls.
The names with pattern "*:|()" will be treated as interaction/combination
term, please make sure all column names in |
time |
column name specifying time, default is 'time'. |
status |
column name specifying event status, default is 'status'. |
sort |
if |
decreasing |
logical, should the sort order be increasing or decreasing? |
add_all |
if |
add_caption |
if |
verbose |
if |
headings |
a |
... |
other arguments passing to |
a list
.
library(survival)
ezcox_group(lung, grp_var = "sex", covariate = "ph.ecog")
ezcox_group(lung, grp_var = "sex", covariate = "ph.ecog", controls = "age")
p <- ezcox_group(lung,
grp_var = "sex", covariate = "ph.ecog",
controls = "age", add_all = TRUE
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.