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.
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.