Why Check Quadrature Resolution?
In a shared-random-effects joint model, each subject's likelihood contribution involves integrating over latent random effects. Numerical quadrature approximates that integral using a finite set of nodes and weights. The resulting likelihood is therefore an approximation, and its accuracy can affect the maximum-likelihood estimates as well as the reported log likelihood.
A fit that has converged computationally is not necessarily accurate with respect to integration. An optimizer may locate a precise maximum of a coarse quadrature approximation, while a finer approximation has a different maximum. Checking estimates across increasing quadrature orders is a practical way to look for this sensitivity. It assesses numerical stability; it does not establish that the statistical model is correct or that its parameters are well identified.
The Likelihood Approximation Being Checked
For illustration, suppose subject \(i\) has a shared random intercept \(b_i\sim N(0,\sigma_b^2)\). Let \(y_i\) denote that subject's longitudinal data, and let \((T_i,\delta_i)\) denote their observed event time and event indicator. Write \(f_Y(y_i\mid b_i;\theta)\) for the conditional longitudinal contribution and \(f_S(T_i,\delta_i\mid b_i;\theta)\) for the conditional survival contribution. Under the model's conditional-independence assumption given \(b_i\), the marginal likelihood contribution is
Here \(\theta\) collects all model parameters, including \(\sigma_b\), and \(\phi\) is the standard normal density. The integral is over the random effect's distribution, not over the observed data. A quadrature rule replaces it with a weighted sum. For Gauss-Hermite quadrature with \(K\) nodes \(x_q\) and weights \(w_q\), one common convention gives
This expression uses weights and nodes for the convention \(\int e^{-x^2}g(x)\,dx\approx\sum_qw_qg(x_q)\). Other software may use a different scaling or normalization, so comparisons should use the same stated quadrature convention. The fitted value at order \(K\), written \(\hat{\theta}_K\), maximizes the approximate log likelihood \(\ell_K(\theta)=\sum_i\log L_{i,K}(\theta)\), subject to the optimizer's convergence.
Why Increasing the Order Is Informative
The transformation \(b=\sqrt{2}\sigma_bx\) converts integration against a normal density into an integral with the \(e^{-x^2}\) weight used by Gauss-Hermite quadrature. As the number of nodes increases, this weighted sum can represent a smooth integrand more accurately. Because the integrand depends on the parameters, improving the integral approximation can change the likelihood surface and hence its maximizer.
This argument motivates a stability check, but it is not a guarantee that a particular finite order is accurate. The likelihood integrand may be sharply peaked, skewed, or concentrated in a tail. Also, Gauss-Hermite node sets at different orders are generally not nested: a higher-order rule is not simply the lower-order rule plus a few extra evaluations. Consequently, a sequence need not change monotonically at every step. What matters in practice is whether successive sufficiently fine resolutions give substantively similar answers.
A Fair Comparison Across Orders
A useful comparison changes the integration resolution while holding everything else fixed. In particular, use the same observations, likelihood definition, parameterization, data scaling, and treatment of censoring at every order. Fit each order to adequate optimizer convergence. Whenever feasible, use the previous order's estimate as one starting value, but also try additional starting values if the likelihood is difficult to optimize. A change in starting values alone can reveal that apparent quadrature sensitivity is actually a failure to find the same maximum.
Use increasing values, such as 9, 15, 25, and 35 nodes for a one-dimensional random effect. The appropriate sequence depends on the model and computational cost.
Record the optimizer status and inspect whether the estimates are finite, plausible, and reproducible from reasonable starting values.
Record each maximized log likelihood, using the same likelihood convention. Compute successive differences, for example \(\ell_{K_2}(\hat{\theta}_{K_2})-\ell_{K_1}(\hat{\theta}_{K_1})\).
For each parameter, calculate its change between successive fits and judge that change against a parameter-specific tolerance and the scientific interpretation of the parameter.
If material changes remain, repeat at a higher order and investigate whether the cause is integration, optimization, or an unstable likelihood surface.
It is often helpful to report both absolute and relative changes. For example, for parameter \(\theta_j\), one can report \(\hat{\theta}_{j,K_2}-\hat{\theta}_{j,K_1}\), and, when the scale makes it meaningful, the relative change \((\hat{\theta}_{j,K_2}-\hat{\theta}_{j,K_1})/\hat{\theta}_{j,K_1}\). Relative changes are not useful when the denominator is near zero; use an absolute, scientifically interpretable scale instead. A single universal numerical tolerance is not appropriate for every parameter or application.
Worked Example: A Stable Fit at Higher Orders
Suppose a hypothetical joint-model analysis of 120 subjects uses a shared random intercept. The parameters of interest are a longitudinal slope \(\beta\) in biomarker units per year, an association parameter \(\alpha\) in the model's stated association scale, and the random-intercept standard deviation \(\sigma_b\) in biomarker units. Each fit uses the same data and likelihood, and the optimizer reports convergence. The following are hypothetical fitted results:
| Nodes \(K\) | Maximized log likelihood | \(\hat{\beta}\) | \(\hat{\alpha}\) | \(\hat{\sigma}_b\) |
|---|---|---|---|---|
| 9 | -412.6840 | 0.3821 | 0.7140 | 0.612 |
| 15 | -412.6110 | 0.3798 | 0.7192 | 0.626 |
| 25 | -412.6074 | 0.3796 | 0.7198 | 0.628 |
| 35 | -412.6071 | 0.3796 | 0.7198 | 0.628 |
For orders 25 and 35, the log-likelihood change is \( -412.6071-(-412.6074)=0.0003\). The slope change is \(0.3796-0.3796=0.0000\) at the displayed precision; the association-parameter change is also \(0.0000\), and the random-effect standard-deviation change is \(0.000\) biomarker units. Suppose, before fitting, the analyst specified practical tolerances of 0.01 log-likelihood units, 0.001 biomarker units per year for \(\beta\), 0.002 for \(\alpha\), and 0.005 biomarker units for \(\sigma_b\). All the displayed 25-to-35 changes are below these tolerances. This supports using order 25 or 35 for these reported quantities, subject to the optimizer checks and the precision of the output. It is not a general proof that order 25 is adequate for other data or models.
Interpreting Changes and Diagnosing Problems
A small change in the log likelihood is useful evidence, but it is not sufficient by itself. Parameters can move while the log likelihood barely changes, especially when the likelihood is flat in one direction or when parameters are strongly correlated. Conversely, a small change in a parameter estimate does not establish that the likelihood approximation is accurate for every purpose. Check parameters that drive key scientific conclusions, including variance and association parameters, rather than only the fixed effects.
If estimates change substantially, first check that each fit really reached the intended maximum. Compare optimizer convergence messages, gradients or other optimization diagnostics, and results from alternative starting values. If multiple starts at a fixed quadrature order lead to different likelihoods, do not attribute the difference to quadrature alone. If fits are reproducible at each order but shift systematically as the order increases, the integration approximation is a more plausible source of sensitivity. In a model with several random effects, tensor-product quadrature can become expensive rapidly; that computational burden may require a different integration strategy, but does not remove the need to assess numerical accuracy.
Worked Example: Detecting Material Sensitivity
For a hypothetical fit to 120 subjects, suppose the likelihood and association estimates at orders 25, 35, and 45 are as follows. All orders use the same model, and repeated optimizer starts give the same maximum at each order.
| Nodes \(K\) | Maximized log likelihood | \(\hat{\alpha}\) |
|---|---|---|
| 25 | -412.6071 | 0.7198 |
| 35 | -412.5900 | 0.6840 |
| 45 | -412.5895 | 0.6832 |
From 25 to 35 nodes, the log-likelihood change is \( -412.5900-(-412.6071)=0.0171\), and the association estimate changes by \(0.6840-0.7198=-0.0358\). From 35 to 45 nodes, the corresponding changes are \( -412.5895-(-412.5900)=0.0005\) and \(0.6832-0.6840=-0.0008\). If a suitable pre-specified tolerance for \(\alpha\) were 0.005, the 25-to-35 shift would be material, while the 35-to-45 shift would be below that tolerance. The results suggest that order 25 is not adequate for the association estimate, whereas the higher-order fits appear more stable. This conclusion relies on the stated repeatability of optimization; if repeated starts disagreed, optimization would need further investigation.
The log likelihood is a sum over subjects. Its numerical change can be small relative to the total even when an individual subject's contribution changes more noticeably. For additional diagnosis, it can help to examine subject-level contributions or their distribution across resolutions, especially if a small number of subjects have extreme outcomes or influential random-effect integrands. That check complements, rather than replaces, comparisons of total likelihood and fitted parameters.
Worked Example: A Stable Log Likelihood Does Not Guarantee Stable Estimates
Suppose a hypothetical analysis of 80 subjects gives these results at two high quadrature orders:
| Nodes \(K\) | Maximized log likelihood | \(\hat{\alpha}\) |
|---|---|---|
| 35 | -96.420 | 0.82 |
| 45 | -96.414 | 0.79 |
The log-likelihood difference is \(-96.414-(-96.420)=0.006\), and the average difference per subject is \(0.006/80=0.000075\). Those small values might look reassuring. However, the association estimate changes by \(0.79-0.82=-0.03\). If a scientifically justified tolerance for this parameter were 0.01, the estimate has not stabilized, even though the average log-likelihood change is small. The analyst should increase the order or otherwise investigate the source of the change, and should examine the shape of the likelihood and optimization behavior. Small changes in the objective do not imply small changes in its maximizer when the objective is relatively flat.
How This Check Relates to Other Approaches
Increasing ordinary Gauss-Hermite order is a direct resolution check for the same quadrature approximation. Adaptive quadrature instead shifts or rescales nodes to better cover the region where the integrand is concentrated. It can improve accuracy with fewer nodes, but its settings and convergence should also be checked. Monte Carlo or importance-sampling integration uses a different numerical approximation; repeated estimates or changes in sampling effort can help assess its simulation error, but it is not the same as a deterministic quadrature-order comparison. Laplace approximation is another alternative, based on a local approximation around an integrand's mode. Agreement between methods can be reassuring, but disagreement requires investigation rather than choosing whichever answer is preferred.
The relevant question is not whether one integration method is universally best. It is whether the method used gives sufficiently stable results for the model, data, and scientific quantities being reported, at a computational cost that is feasible. A comparison should state the method and resolutions used so that the numerical check can be understood and reproduced.
Common Pitfall and Limitations
Wrong reasoning: “The log likelihood changed by less than 0.01, so every parameter estimate is accurate.” This does not follow: a flat likelihood can have a similar value over a range of parameter values, and a small total change can conceal a meaningful shift in an important estimate. Correction: compare the log likelihood and each scientifically important parameter, using sensible scales and explicit tolerances.
A stability check is a numerical diagnostic, not a test of model fit, an assessment of sampling uncertainty, or proof of identifiability. Stable estimates can still be biased by model misspecification, and a poorly identified parameter can remain uncertain even when numerical integration is accurate. Numerical stability also depends on the likelihood being evaluated consistently and the optimizer locating the same maximum at each resolution.
Check Your Understanding
Use the stated values and show the relevant calculation for each question.
- At orders 20 and 30, the maximized log likelihoods are -205.310 and -205.304. Calculate the change and state what that calculation can and cannot establish.
- A key parameter changes from 1.20 to 1.16 as the order increases, while the log likelihood changes very little. Why is the likelihood comparison alone insufficient?
- List two conditions that should be held fixed when comparing quadrature orders.
- What would you investigate if repeated starting values produce different fitted likelihoods at the same quadrature order?
Solutions. (1) The change is \(-205.304-(-205.310)=0.006\). This is evidence that the maximized log likelihood changed little at the displayed precision, but it does not establish that all parameter estimates are stable or that the model is correct. (2) The parameter change is \(1.16-1.20=-0.04\), which could be scientifically meaningful depending on its scale and context; a flat likelihood can allow parameter movement with little change in objective value. Compare the parameter change against a justified tolerance as well. (3) Examples include the data, likelihood definition, parameterization, censoring treatment, and quadrature convention; at least two must remain unchanged for a fair comparison. (4) Investigate optimizer convergence, starting values, gradients or other optimization diagnostics, and whether each run found the intended maximum before attributing differences to integration resolution.