Bayesian Survival Analysis - COX PHD Time Varying Covariates Implementation

Suppose you are interested in the Survival modelling technique Cox Proportional Hazard, where we model the hazard as:

$$\lambda(t \vert x) = \lambda_0(t) exp (\beta x)$$

An extension of this model is time-varying covariates i.e.

$$\lambda(t \vert x(t)) = \lambda_0(t) exp (\beta x(t))$$

Another extension is time-dependent effects i.e.:

$$\lambda(t \vert x) = \lambda_0(t) exp (\beta(t)x)$$

I am interested in time-varying covariates and have strong prior beliefs over the coefficients of the covariates (in the partial hazard) as well as the baseline. I have seen examples of Bayesian survival modelling (with Cox PHD) where you have time-dependent effects (i.e. a sequence of regression coefficients), see this example using PyMC3 and Python:

However, in the situation where you have time varying covariates, I am yet to find an example or implementation of this in python (or R for that matter). My question is:

1. Is there a reason why you do not see implementations of Bayesian time-varying covariates COX PHD?
2. If no to the above, does anyone have a good example of an implementation?

Many thanks

• How many distinct event times are there in your data? If you happen to have a discrete time problem this is easier to handle. – Frank Harrell Feb 21 at 12:53