sambrilleman / rstanarm

rstanarm R package for Bayesian applied regression modeling
http://mc-stan.org/interfaces/rstanarm.html
GNU General Public License v3.0
0 stars 1 forks source link

Set cumulative hazard equal to zero where last known survival time is time zero #49

Closed sambrilleman closed 7 years ago

sambrilleman commented 7 years ago

Set cumulative hazard equal to zero where last known survival time is time zero. Avoids an error when the quadrature times are all zero (for an individual) because the event time (or last known survival time is zero).

Also fixed an error where the event times where not being included in the times used to generate the event submodel design matrices in jm_data. This didn't cause any problem for posterior_survfit, because the event times aren't needed to get survival probabilities. BUT, it did cause a problem for the log likelihood calculation for the event submodel, and therefore also for the log likelihood calculation for the full joint model -- this means that the log_lik method, as well as loo/WAIC, might have been slightly incorrect. Also, the log likelihood is used in the MH algorithm for generating new b pars in posterior_survfit, so this might have also been incorrect.