library(survival)
library(ezcox)
lung$ph.ecog <- factor(lung$ph.ecog)
ezcox(lung, covariates = c("age"), controls = "sex:ph.ecog")
ezcox(lung, covariates = c("age", "wt.loss"), controls = "sex:ph.ecog")
show_forest(lung, covariates = c("age", "wt.loss"), controls = "sex:ph.ecog")
lung2 <- lung
lung2$sex <- ifelse(lung2$sex == 1, "M", "F")
ezcox_group(lung2, grp_var = "sex", covariate = "ph.ecog", controls = "age : wt.loss")
library(survival)
library(ezcox)
lung$ph.ecog <- factor(lung$ph.ecog)
# Build unvariable models
# and show global p value for each model
# aside the 'reference' label.
show_forest(lung, covariates = c("age", "sex", "ph.ecog"), show_global_p = "aside")