I was looking at a Youtube video I found online. I'm new to survival analysis. The host mentioned that the second graph was created using a mixture of packages Broom & ggplot2.
Any ideas?
# Current Code:
sigMod = coxph(Surv(time, DEATH_EVENT) ~ age+anaemia+creatinine_phosphokinase+ejection_fraction+
serum_creatinine+hypertension, data=HF)
ggforest(sigMod, data = HF)
EDIT 1
Added code so far:
tidy(sigMod) %>% select(term, estimate) %>%
ggplot(aes(x=estimate, y=term)) + geom_boxplot()
EDIT 2
My Model's data after using Broom: | Term | Estimate | |---------------------|------------------| | Age | 0.0436065795 | | Anaemia1 | 0.3932590155 | | creatinine_phosphokinase | 0.0001964616 | | ejection_fraction | -0.0517850968 | | serum_creatinine | 0.3483455436 | | hypertensionPresent | 0.4667523759 |
Here's a fully reproducible example of how something like your target plot could be achieved, using the
pbc
dataset from thesurvival
package. Just swap in your owncoxph
call at the start: