Evaluate Bayesian discrete-time survival model with time-varying covariates

I have fitted a Bayesian discrete-time survival model with time-varying covariates as a binomial regression, adapting to the excellent material from @Solomon, here.

brm_model_surv <- brm(
    event | trials(1) ~ 0 + Intercept + a + b + (1|subject),
    data = data, family = binomial)

where a and b are the covariates that vary over time, and subject denotes the subject that may have been measured several times (therefore the random effect).

I would now like to understand how well the model (predictions) represents the data, visually for the first. I have seen plots generated via the rstanarm package that show the predicted survival probability to the Kaplan-Meier curve: Graphical checks of the estimated survival function — ps_check • rstanarm (mc-stan.org)

How could I achieve a similar plot with brms? I think I will need to somehow combine the predictions by, for instance, averaging the probabilities obtained through the predict function across runs for each subject at certain times, but perhaps I am missing a simpler way here.

  • Operating System: Windows 10
  • brms Version: 2.17.0

Just to update, I have for now given up on the approach of assessing the model predictions via survival curves. It may be the time-dependency of the covariates that has been preventing me from getting reasonable curves, but I am not sure.

I now reverted to assessing the calibration through Hosmer-Lemeshow-style calibration plots, similarly as they were used in this work on discrete-time survival models.