Open MelisAnaturk opened 4 years ago
Hi! I have the same problem; would like to use ggforest to plot several univariate coxph models. Has anyone found out yet how to do this? Thank you!
Check out forestmodel. Here is some example code that will do exactly what you would like.
`univ_formulas <- sapply(vars_for_table, function(x) as.formula(paste('Surv(Survival_Months, Overall_Death)~', x)))
univ_models <- lapply(univ_formulas, function(x){coxph(x, data = data2)})
forest_model(model_list = univ_models,covariates = vars_for_table,merge_models =T)`
Hi, I would like to plot the results of multiple univariate cox prop hazard models as an initial exploratory step in my analysis. Is it possible to adapt the ggforest function to take in data frames that contain the same information as tidy(model) and glance(model) but for several seperate models? My code so far:
Thank you!