Joint Model Specification

Hi all,

I’m trying to specify a standard joint model in stan. Specifically, a shared parameter model whereby a longitudinal biomarker (longitudinal mixed effect submodel) is associated with a time to event (survival submodel). This takes the general form below:

\begin{cases} Y_i(t) = \beta x_i^\top (t) + b_i z_i^\top (t) + \epsilon_i(t) \\ h_{event}(t) = h_{0}(t) \exp \{ \gamma^\top \omega + \alpha [Y_i(t)] \} \end{cases}

I can see that there are implementations in rstanarm but ultimately my motivation is to specify a custom association structure (\alpha), and so I would like to specify the model myself directly in stan.

I’m coming from a frequentist background and I’m extremely novice with bayesian methods, so apologies if this isn’t the right forum for the question. Any educational pointers for stan in general would also be really appreciated!

Thank you in advance.

I don’t have experience with these models, but if working from the stuff in rstanarm is reasonable for your project then there’s a fair bit of stuff about that model floating around.

@sambrilleman wrote a paper here: Joint longitudinal and time-to-event models for multilevel hierarchical data | Sam Brilleman

He gave a talk at Stancon in 2018 that might have a different take: https://github.com/stan-dev/stancon_talks/tree/master/2018/Contributed-Talks/03_brilleman

The video of that is here: https://www.youtube.com/watch?v=8r-Ipt885FA&list=PLGVZCDnMOq0q3E0V4idUQ-WviHC6qMb62&index=2&t=0s

Hope that helps!

2 Likes

This is great thank you so much. I have started reading through some of Sam’s extensive (and quite brilliant) work and have reached out to him directly.

@doc_ed Hi Ed, yeah @bbbales2 has given some good resources to check out. In particular, if you want to understand how to implement the Stan code yourself then you should look at the StanCon 2018 talk/notebook. You can see the .stan file here. And then check out Section 3 of the supporting notebook, which describes in detail each section of the .stan file and what it is doing.

That talk/notebook describes a simplified form of the model in rstanarm, so you can start to extend upon it as you wish. Note that it describes a multivariate joint model (i.e. two Y variables) so you can drop everything related to Y_2 if you don’t need it. Also note that some of the Stan code might need to be updated a bit to get it to run with the latest version of Stan, since there probably has been a few key Stan updates since Jan 2018 (any error messages you get at runtime should explain anything you might need to fix). Good luck! :-)

2 Likes