Assem
May 2, 2018, 7:13am
1
Please also provide the following information in addition to your question:

Operating System: Windews 7
rstanarm Version:
Hello everyone!
Is there any possible way to use the rstanarm package for fitting the Cox regression model?!
Or any example?!

Thanks in advance

Not currently. There is another thread discussing the prospects for survival models at

As @jonah suggested let’s have this post to discuss the best way to collaborate on this and whether it should be part of an existing package or a new one.
As a start we could also collect models to be implemented:
Royston-Parmar flexible parametric models
Poisson time spliting approach (like described here and here ).

In the meantime you can try to use a workaround with rstanarm or brms in case you are interested in semi-parametric piece-wise constant proportional hazard models. These you can cast into the form of a poisson regression, following the ideas outlined here

This is an awesome idea! Just to make sure I understand correctly (and for future readers) let me try and formulate the idea in my own words (or mathematical notation):
W.l.o.g. set the origin of time to 0.
Suppose the event (either 0 or 1) for individual i has occurred at time t_i.
Suppose there are n_i unique event times before t_i and denote them by t_1 < t_2 < \dots <t_{n_i}.
For individual i we construct n_i+1 observations of the form (t_1, 0), ( t_2 - t_1, 0), (t_3-t_2, 0),…, (t_{n_{i}…