Open utterances-bot opened 8 months ago
This is an excellent explanation! Thanks a lot.
Thanks!
I was doing calibration plot myself and came across your post. Wonderful code and explanation! I was wondering if you know how to make the calibration plot for survival models, especially recurrent event models such as the following one: library(survival) library(rms) fit1 <- coxph(Surv(start, stop, event) ~ transplant + age + year + cluster(id), data= jasa1)
Thanks Chao! Glad you liked it. I regret that I can't help with the calibration plot for the survival models. I'll put it on my long list of future posts that I want to write.
Recurrent event models are new to me. Do you have an explainer?
Hi John, recurrent event models are an extension of survival models that focus on the occurrence of events (e.g., diseases or hospitalizations) that happen repeatedly over time (see https://en.wikipedia.org/wiki/Recurrent_event_analysis). The rms package can handle survival models: set.seed(1) n <- 200 d.time <- rexp(n) x1 <- runif(n) x2 <- factor(sample(c('a', 'b', 'c'), n, TRUE)) f <- cph(Surv(d.time) ~ pol(x1,2) * x2, x=TRUE, y=TRUE, surv=TRUE, time.inc=1.5) cal <- calibrate(f, u=1.5, cmethod='KM', m=50, B=20) But it doesn't seem to work on recurrent event models. So your post made me think if we can do this by hand without using the rms package...
Bias corrected calibration curve from scratch | Random effect
https://randomeffect.net/post/2021/03/10/bias-corrected-calibration-curve-from-scratch/