Why the E-Step Needs a Subject-Specific Posterior
In a shared random-effects joint model, a subject’s latent random effects help describe both their longitudinal trajectory and their event-time risk. Once that subject’s measurements and event or censoring time are observed, the random effects are no longer described only by their population distribution: the observed data update that distribution. The E-step uses this subject-specific posterior distribution to take conditional expectations of quantities involving the latent effects.
The key is to condition on all the subject’s observed information. A posterior based only on the longitudinal measurements discards the survival information; one based only on the event time discards the longitudinal information. The posterior below combines both, at a fixed current parameter value in the EM algorithm.
Factorizing the Posterior
For the standard shared-random-effects formulation, assume that, conditional on \(b_i\) and the observed covariates, the longitudinal measurements and event process are independent. Also assume that the censoring mechanism is noninformative conditional on the modeled information, so it contributes no additional parameter-dependent factor. Under these assumptions, the likelihood contribution factors into a longitudinal term and an event-time term:
For right-censored event times, let \(\lambda_i(t\mid b_i;\theta)\) be the conditional hazard and \(H_i(t\mid b_i;\theta)=\int_0^t\lambda_i(s\mid b_i;\theta)\,ds\) the cumulative hazard. The event-time likelihood contribution is
When \(\delta_i=1\), the contribution includes the hazard at the observed event time as well as survival up to that time. When \(\delta_i=0\), it is just \(\exp\{-H_i(\tilde T_i\mid b_i;\theta)\}\), the probability of surviving beyond the censoring time. Thus censoring is not the absence of event-time information: it tells us the subject remained event-free until \(\tilde T_i\).
In the E-step, \(\theta\) is held at the current iterate, say \(\theta^{(k)}\). The posterior is then formed using that value. Its normalizing integral is generally not available in closed form, even if the random-effects distribution is multivariate normal, because the longitudinal and survival likelihood factors can make the product non-Gaussian. Numerical integration methods for such integrals are useful here, but the posterior definition itself does not depend on a particular computational method.
Worked Posterior Calculations
Worked Example: Combining Longitudinal Data With Right Censoring
Consider a hypothetical subject whose scalar random effect \(b\) can take values \(-1,0,1\), each with prior probability \(1/3\). For the observed longitudinal data, suppose the likelihood factors at these values are \(0.30,1.00,1.50\), respectively. At the subject’s censoring time, suppose the conditional survival probabilities are \(0.333,0.570,0.129\). The subject is right-censored, so these survival probabilities—not event hazards—are the event-time factors.
The posterior weight at each value is proportional to prior probability times longitudinal likelihood times censoring contribution. The common prior factor \(1/3\) cancels in normalization, leaving unnormalized weights
Their sum, using the rounded survival value at \(b=-1\) as \(0.3333\), is approximately \(0.8635\). Dividing by this sum gives posterior probabilities approximately \(0.1158,0.6601,0.2241\), in the order \(b=-1,0,1\). For example, \(0.570/0.8635\approx0.6601\). The posterior mean is therefore
The posterior puts most mass at \(b=0\), even though the longitudinal factor alone is largest at \(b=1\). The censoring information shifts the relative weights. The calculation illustrates why an E-step posterior must include the event-time contribution even when no event was observed.
Worked Example: Event Information and Posterior Odds
Suppose a hypothetical subject’s random effect is either \(-1\) or \(1\), with equal prior probabilities. The subject has an observed event at time \(1\). Let the conditional hazard be \(\lambda(t\mid b)=0.2e^b\) over this interval, so \(H(1\mid b)=0.2e^b\). Suppose the longitudinal data have likelihood ratio \(p(y\mid b=1)/p(y\mid b=-1)=e^{-1}\).
The event-time likelihood ratio, comparing \(b=1\) with \(b=-1\), is
The prior odds are one. Multiplying the prior odds, longitudinal likelihood ratio, and event-time likelihood ratio gives posterior odds
Consequently, \(P(b=1\mid y,\tilde T=1,\delta=1)=1.699/(1+1.699)\approx0.6295\). The event favors \(b=1\), while the longitudinal likelihood favors \(b=-1\); their combined evidence, with equal prior odds, leaves the posterior probability of \(b=1\) at about \(0.6295\). This is a posterior probability under the specified model and data, not a probability that a fixed parameter is true.
Worked Example: Locating a Continuous Posterior Mode
Suppose a hypothetical scalar random effect has prior \(b\sim N(0,0.5)\). The longitudinal likelihood is proportional to \(\exp(b)\). The subject is right-censored at a time for which \(H(\tilde T\mid b)=0.25e^b\). The posterior kernel is the product of the prior density, longitudinal likelihood, and censoring survival contribution:
Ignoring constants, the log posterior is \(\ell(b)=-b^2+b-0.25e^b\). Its derivative is \(1-2b-0.25e^b\), and its second derivative is \(-2-0.25e^b\), which is strictly negative for every real \(b\). Hence the log posterior is strictly concave and its unique stationary point is its unique mode. At \(b=0.327\), the derivative is
Solving the derivative equation gives a mode of approximately \(0.3267\). The negative derivative at \(0.327\), together with strict concavity, is consistent with the root lying just below \(0.327\). This mode summarizes the location of the posterior’s peak; it is not, by itself, the posterior mean or a complete description of posterior uncertainty.
Why the Posterior Is Not Just a Plug-In Estimate
The posterior distribution is the object needed for conditional expectations in the E-step. Replacing it with a single estimated random effect, such as its mode, changes an expectation over uncertainty into evaluation at one point. For a nonlinear function \(g\), in general,
where \(\hat b_i\) might denote the posterior mode. The differences can matter when the posterior is skewed, broad, or multimodal, or when the quantity being averaged is nonlinear. A mode-centered approximation can be useful computationally, but its adequacy should be checked against the posterior’s spread and shape.
A direct computational route is to evaluate the unnormalized posterior kernel at integration nodes, multiply by the relevant quadrature weights, and normalize the resulting weights. For continuous \(b_i\), the normalizing constant is an integral; for discrete \(b_i\), it is a finite sum. In either case, numerical stability matters: forming products of many small likelihood values can underflow. Calculating log weights and subtracting their maximum before exponentiating preserves the normalized probabilities.
Assumptions, Diagnostics, and Alternatives
The factorization used above relies on the stated conditional-independence structure and an ignorable censoring mechanism. If longitudinal residuals and event times remain dependent after conditioning on the modeled random effects, or if censoring is informative, the likelihood must include the relevant additional dependence or censoring model. Omitting it can produce a posterior that is computationally well normalized but scientifically misspecified. The assumed random-effects distribution and the longitudinal and hazard models also affect the posterior and should be assessed as parts of the joint model.
Useful checks include verifying that normalized discrete weights sum to one (up to rounding), that a continuous posterior integrates to one under the chosen numerical method, and that posterior summaries remain stable when integration accuracy is increased. Inspecting the log posterior over plausible random-effects values can reveal a boundary-truncated search, an unexpected second mode, or a very long tail that a local approximation may miss. Also check that the event contribution changes correctly with \(\delta_i\): an observed event includes the hazard factor, whereas right censoring does not.
| Approach | What it represents | Main limitation |
|---|---|---|
| Full posterior integration | Averages over the subject-specific posterior distribution | Can be computationally demanding, especially for high-dimensional random effects |
| Posterior mode or empirical Bayes plug-in | Uses one representative random-effects value | Does not retain posterior uncertainty and can misrepresent nonlinear expectations |
| Local Gaussian approximation | Approximates the posterior near its mode using local curvature | May be inaccurate for skewed, heavy-tailed, or multimodal posteriors |
These alternatives address different computational needs; they are not interchangeable definitions of the posterior. In particular, the full posterior remains the target even when an approximation is used to calculate its expectations. For high-dimensional effects, computational cost and approximation error should be considered together rather than assuming a mode or a small number of integration points is sufficient.
Common Mistake
A frequent error is to treat a censored subject as if the event-time component were absent because the event itself was not observed. That reasoning ignores the information that the subject remained event-free through the censoring time. The correction is to use the conditional survival probability \(\exp\{-H_i(\tilde T_i\mid b_i)\}\) for a right-censored observation. A second related error is to use that survival term alone for an observed event; when \(\delta_i=1\), the hazard at the event time must also appear.
Check Your Understanding
Answer each question, then compare with the solutions below.
- For right censoring at time \(c\), what event-time likelihood factor enters the posterior?
- A discrete random effect has prior probabilities \(0.25\) and \(0.75\), and the full data likelihood factors are \(0.8\) and \(0.2\). Find the normalized posterior probabilities.
- Why does the likelihood contribution for an observed event include a hazard factor in addition to survival through the event time?
- Give one reason that evaluating a nonlinear function at the posterior mode need not equal its posterior expectation.
Solutions. (1) The factor is \(S(c\mid b)=\exp\{-H(c\mid b)\}\). (2) The unnormalized weights are \(0.25(0.8)=0.20\) and \(0.75(0.2)=0.15\), with sum \(0.35\); the posterior probabilities are \(0.20/0.35\approx0.5714\) and \(0.15/0.35\approx0.4286\). (3) The subject must survive up to the event time and then experience the event in an infinitesimal interval around that time, represented by the hazard factor. (4) A posterior expectation averages over the full distribution, including its spread and shape; a mode is only its peak, so for nonlinear functions the two generally differ.