Closed potentece closed 4 years ago
I have fixed, you can try the code
remotes::install_github("ShixiangWang/forestmodel")
library("forestmodel")
library("survival")
library("dplyr")
pretty_lung <- lung %>%
transmute(time,
status,
Age = age,
Sex = factor(sex, labels = c("Male", "Female")),
ECOG = factor(lung$ph.ecog),
`Meal Cal` = meal.cal)
print(forest_model(coxph(Surv(time, status) ~ ., pretty_lung), covariates=c("Age", "Sex")))
Please close it if it solves this issue.
https://stackoverflow.com/questions/58341653/ggforest-survminer-only-selected-covariates