Using stan_jm for parametric proportional hazards regression only

I would definitely be interested in working on this. I have been talking about working on it for about 18 months now but have never gotten around to it. Happy to help out in any way.

1 Like

@kaybenleroll and @ermeel or anyone else interested, can you start a separate topic for this? We can discuss the best way to collaborate on this and whether it should be part of an existing package or a new one.

@Gianluca_Baio, Thanks for the update. I’ll definitely take a closer look at survHE! I looked enough that I felt comfortable recommending it here but I’m not super familiar with it yet.

@jonah, could you point me to an example how to do this? I would like to make my recent i-spline-based Royston & Parmar Stan code somewhat easier to use through this.

I haven’t really tried it with the survival package, but from what I recall it’s similar to lme4 and other packages we’re emulating in rstanarm in that you can retrieve model matrices and all sorts of metadata from the objects it returns. The survreg function (and others from the survival package) probably does a lot of the same preprocessing that is needed.

Thanks @jonah . Indeed https://github.com/therneau/survival/blob/master/R/survreg.S looks very helpful!

Great. Our new package (or rstanarm) can certainly import the survival package in order to use it internally. I haven’t looked at its license yet, but we can also probably copy and tweak its code and use it internally, acknowledging the appropriate copyrights (see e.g. the authors section in the rstanarm DESCRIPTION file). So you’re not restricted to just calling its functions, you can probably copy chunks of code too.