From Conditional Contributions to Observed-Data Likelihood
In a shared random-effects joint model, a subject’s longitudinal measurements and event-time outcome are conditionally linked through the same latent random effects. Those random effects are not observed. Consequently, the likelihood for the data we actually observe must account for their uncertainty rather than act as if each subject’s random effects were known.
The central operation is to average a subject’s conditional likelihood over the distribution of that subject’s random effects. This is called marginalizing over the random effects. It converts a likelihood conditional on latent quantities into a likelihood for observed data alone. The integration is performed separately for each subject, and the resulting subject-level contributions are then multiplied.
The integration is over every component of \(b_i\). If \(b_i\) is a vector of dimension \(q\), this is a \(q\)-dimensional integral. If the random-effects distribution has discrete support, the integral is replaced by a sum over its possible values. In either case, the integrand combines two pieces: how compatible the observed data are with a given random-effects value, and how much probability the random-effects model assigns to that value.
The Subject Contribution and the Marginal Likelihood
Under the conditional-independence assumptions of the basic joint model, the longitudinal observations and event-time contribution are independent given \(b_i\) and the covariates. In notation, the conditional likelihood can be written as
Here \(L_{Yi}\) is the longitudinal likelihood conditional on \(b_i\), \(h_i\) is the subject-specific hazard, and \(S_i\) is the corresponding conditional survival function. When \(\delta_i=1\), the event-time factor is \(h_i(t_i\mid b_i;\theta)S_i(t_i\mid b_i;\theta)\), the conditional event-time density. When \(\delta_i=0\), it is \(S_i(t_i\mid b_i;\theta)\), the contribution from a right-censored time. This form assumes that the censoring mechanism can be omitted from the likelihood under the model’s censoring assumptions; if censoring is modeled as informative, its likelihood contribution must also be included.
After integrating over \(b_i\), the longitudinal and event-time observations need not be marginally independent. They both provide information about the same latent effects, and averaging over those effects can induce dependence. The marginal likelihood therefore integrates the joint conditional contribution; it does not generally multiply separately marginalized longitudinal and event-time likelihoods.
The order of operations in the log-likelihood matters: integrate within each subject, take the logarithm of that marginal contribution, and then sum across subjects. The random effect \(b_i\) is shared between the two submodels for subject \(i\), but different subjects have different random effects. A shared population distribution does not mean that all subjects have the same realized random effect.
Why the Integral Is the Observed-Data Likelihood
The likelihood follows directly from the law of total probability. For a fixed possible random-effects value \(b_i\), the conditional data density is \(L_i^c(\theta\mid b_i)\). The random effect itself has density \(f_b(b_i;\theta)\). To obtain the probability density of the observed data without conditioning on the unobserved \(b_i\), sum or integrate over all possible values of that random effect:
This argument also explains why substituting an estimated random effect is not the same operation. A plug-in calculation evaluates \(L_i^c\) at one value; marginalization averages \(L_i^c\) over the whole distribution, weighted by \(f_b\). Unless special conditions make them equal, these are different quantities.
Worked Example: Marginalizing a Discrete Random Effect
Suppose a hypothetical subject has a scalar random effect \(b_i\) taking the values \(-1,0,1\) with probabilities \(0.20,0.50,0.30\), respectively. At those values, suppose the conditional longitudinal likelihoods are \(0.50,0.40,0.25\), and the conditional event-time contributions are \(0.20,0.50,0.20\). Calculate the subject’s marginal likelihood.
At each possible random-effects value, first multiply the two conditional likelihood components. For \(b_i=-1\), the combined conditional contribution is \(0.50(0.20)=0.10\). For \(b_i=0\), it is \(0.40(0.50)=0.20\). For \(b_i=1\), it is \(0.25(0.20)=0.05\).
Now weight each contribution by the probability of its random-effects value and sum:
Thus the observed-data likelihood contribution is \(0.135\). It is not the conditional likelihood at the average random effect: the average is \(0.20(-1)+0.50(0)+0.30(1)=0.10\), and evaluating the conditional likelihood at \(b_i=0.10\) would not perform the required weighted average.
Numerical Integration in Practice
For continuous random effects, the integral is often not available in closed form. It must be approximated numerically. A basic quadrature approximation replaces the integral by a weighted sum of integrand values. The nodes and weights are chosen to approximate integration under the random-effects distribution; their appropriate choice depends on the distribution and numerical method.
Worked Example: A Weighted-Sum Approximation
For a hypothetical subject with one random effect, suppose a numerical integration method gives three nodes with weights \(0.25,0.50,0.25\). At the nodes, the conditional longitudinal likelihoods are \(0.20,0.40,0.10\), and the event-time contributions are \(0.20,0.40,0.80\). Use the weighted sum to approximate the marginal subject likelihood.
The conditional joint likelihood at the three nodes is \(0.20(0.20)=0.04\), \(0.40(0.40)=0.16\), and \(0.10(0.80)=0.08\). Weighting and summing gives
This is a numerical approximation, not an exact value unless the chosen nodes and weights integrate this particular integrand exactly. If a second independent subject has a separately approximated marginal contribution of \(0.070\), the two-subject likelihood is \(0.110(0.070)=0.00770\). The multiplication occurs after each subject’s own integration.
When likelihood values are very small, calculations are commonly carried out on the log scale to reduce numerical underflow. For a quadrature approximation \(L_i\approx\sum_k w_k L_i^c(b_k)\), calculate the weighted sum accurately before taking its logarithm, or use a stable log-sum-exp computation when the terms are represented as log-likelihoods. Taking the logarithm of each node contribution and then forming an unweighted average is not equivalent.
Why Each Subject Is Integrated Separately
A frequent error is to confuse sharing a random effect across the two submodels for one subject with sharing one random effect across all subjects. The distinction can be seen in a small calculation.
Worked Example: Product of Marginal Contributions or One Common Effect?
Suppose there are two hypothetical subjects, A and B. Each subject’s random effect independently takes values \(-1\) and \(1\), each with probability \(0.50\). The conditional likelihood values for A are \(0.50\) at \(-1\) and \(0.10\) at \(1\); for B they are \(0.10\) at \(-1\) and \(0.50\) at \(1\). Find the two-subject observed-data likelihood.
Marginalize subject A:
Marginalize subject B:
Because the subjects’ random effects are independent, the observed-data likelihood is \(L_A L_B=0.30(0.30)=0.090\). If one instead imposed a single common random effect for both subjects, the calculation would be
which is a different model and a different likelihood. In the joint model, A’s longitudinal and event-time contributions share \(b_A\), and B’s share \(b_B\); this does not equate \(b_A\) and \(b_B\).
Assumptions, Diagnostics, and Limitations
The marginal-likelihood construction relies on a coherent conditional model and a specified random-effects distribution. In particular, the conditional likelihood must correctly represent the longitudinal and event-time observations given \(b_i\), the same \(b_i\) must enter the submodels as stated, and the distribution \(f_b\) must be normalized and appropriate for the model. The product across subjects additionally assumes independent subjects and independent random-effects draws across subjects, conditional on shared population parameters and covariates. The censoring assumptions must justify the event-time contribution being used.
Numerical integration adds its own checks. Compare estimates or log-likelihood values under increasingly accurate integration settings where feasible. Large changes suggest inadequate integration. In higher dimensions, a method that works well for a scalar random effect may be inaccurate or computationally expensive. Check that quadrature weights and nodes correspond to the intended distribution, and watch for overflow or underflow in the integrand. A suspiciously unstable likelihood can also signal a model-identification problem, not merely an integration problem.
The marginal likelihood is the standard likelihood for estimating population parameters when the random effects are latent and modeled as random. Conditional likelihoods can be useful for describing subject-specific contributions when the effects are treated as fixed known quantities, but they are not the observed-data likelihood here. Likewise, plugging in a predicted or estimated random effect discards the averaging over its uncertainty. Such substitutions may be useful for prediction or summaries, but they should not be presented as the same likelihood used for marginal inference.
Marginalization does not guarantee that a model is well specified or that the integral is easy to evaluate. Results depend on the assumed conditional submodels and random-effects distribution; misspecification can affect both the estimated association and uncertainty. The integral may require approximation, and complex or high-dimensional random effects can make computation demanding. These are reasons to check numerical stability and model assumptions, rather than reasons to replace the observed-data likelihood with a plug-in expression.
Check Your Understanding
Answer each question, then compare your reasoning with the solutions.
- Write the marginal subject likelihood when the conditional likelihood is \(L_i^c(\theta\mid b_i)\) and the random-effects density is \(f_b(b_i;\theta)\).
- Two independent subjects have marginal likelihood contributions \(0.12\) and \(0.05\). What is their joint observed-data likelihood?
- Why is multiplying a separately marginalized longitudinal likelihood by a separately marginalized event-time likelihood generally not the same as marginalizing their joint conditional likelihood?
- For two subjects with independent random effects, should the likelihood integrate over one common effect or over a separate effect for each subject?
Solutions. (1) \(L_i(\theta)=\int L_i^c(\theta\mid b_i)f_b(b_i;\theta)\,db_i\). (2) Independence gives \(0.12(0.05)=0.00600\). (3) Both submodels depend on the same within-subject \(b_i\), so the correct integrand contains their product before integration; separating the integrations generally removes dependence induced by that shared latent effect. (4) Integrate each subject’s contribution over that subject’s own random effect, then multiply the marginal contributions.