# NOT RUN {
library(survival)
sr <- survreg(
Surv(futime, fustat) ~ ecog.ps + rx,
ovarian,
dist = "exponential"
)
td <- tidy(sr)
augment(sr, ovarian)
glance(sr)
# coefficient plot
library(ggplot2)
ggplot(td, aes(estimate, term)) +
geom_point() +
geom_errorbarh(aes(xmin = conf.low, xmax = conf.high), height = 0) +
geom_vline(xintercept = 0)
# }
Run the code above in your browser using DataLab