Huge R-hat and low effective size in piecewise exponential model when using more than one predictor and interval

Do you have a plot of what the is piecewise constant here? It is difficult to reverse engineer the eqs. though thanks for typing them out.

Piecewise constant things have jumps, right? So as a plot, dy/dx wouldn’t exist. If these differentials are necessary for Stan to work (if a parameter goes into computing x), then this lack of differentiability could easily break the sampler.

Have you seen this thread: Survival models in rstanarm ? I think there are some survival models in rstanarm (that came from that thread), and there are probably other things as well. Would adapting one of those models be appropriate for what you’re trying to do?

1 Like