This vignette walks through Bayesian estimation of the
three-parameter Exponentiated Danish (ED) submodel and the full
four-parameter Beta-Danish distribution using
bayes_betadanish().
post_mean <- summary(draws)$statistics[, "Mean"]
b <- post_mean["b"]; c <- post_mean["c"]; k <- post_mean["k"]
km <- survival::survfit(survival::Surv(time, status) ~ 1, data = remission)
plot(km, conf.int = FALSE, xlab = "Time (months)",
ylab = "Survival probability",
main = "Posterior mean ED fit on remission data")
t_grid <- seq(0.1, max(remission$time), length.out = 200)
S_post <- pbetadanish(t_grid, a = 1, b = b, c = c, k = k,
lower.tail = FALSE)
lines(t_grid, S_post, col = "red", lwd = 2)
legend("topright",
legend = c("Kaplan-Meier", "Posterior-mean ED"),
col = c("black", "red"), lty = 1, lwd = c(1, 2), bty = "n")