drizopoulos / JMbayes2

Extended Joint Models for Longitudinal and Survival Data
https://drizopoulos.github.io/JMbayes2/
79 stars 23 forks source link

Question: Survival likelihood contribution for delayed entry #55

Closed jcgiardina closed 1 year ago

jcgiardina commented 1 year ago

Thank you for such a great package -- it has been so helpful and easy to use!

I was hoping you could answer a quick question I had about how the package handles delayed entry. My naive assumption was that delayed entry is incorporated into the likelihood function by conditioning on surviving until the entry time given the random effects, so that for entry time $T{i0}$, event/censor time $T{i1}$, and censoring indicator $\delta{i}$, the survival contribution to the likelihood function is: $$p(T{i1},\delta{i}|T{i}^{*}>T{i0},b{i},\theta) = h(T{i1}|b{i},\theta)^{\delta{i}}\frac{S(T{i1}|b{i},\theta)}{S(T{i0}|b{i},\theta)} = h(T{i1}|b{i},\theta)^{\delta{i}}\exp{\left(-\int{T{i0}}^{T{i1}}h(u|b{i},\theta)du\right)}$$

In other work on delayed entry with joint models, however, I've noticed that the entire likelihood function is divided by the probability of surviving until the entry time, with numerator and denominator separately integrated over the random effects distribution (e.g., equation 5 in Crowther et al.), so that the likelihood function is: $$L(\theta)=\frac{\int p(T{i1},\delta{i}|b{i},\theta) p(y{i}|b{i},\theta) p(b{i}|\theta) db{i}}{\int S(T{i0}|b{i},\theta) p(b{i}|\theta) db_{i}}$$

Do you know which approach JMbayes2 takes to delayed entry? I'm using the package in a current project, and I'm just hoping to confirm either way for when I write-up the manuscript. (And apologies if there's an obvious answer -- unfortunately I don't know C++ well enough to figure this out directly from the code.) Thank you again for a fantastic package!

drizopoulos commented 1 year ago

Under the Bayesian approach, we define the likelihood conditional on the random effects, whereas, under the frequentist approach, we integrate the random effects out. In JMbayes2, the former equation is used.