Why an Unstable Fit Needs a Workflow
A joint-model fit can produce a warning, an implausibly large coefficient, or a standard error that changes dramatically when the optimizer is rerun. These symptoms have different possible causes: poor numerical scaling, sensitivity to starting values, inaccurate integration, or a likelihood that contains little information about one or more parameters. Repeating the fit with a different optimizer setting may help, but it does not by itself reveal which problem occurred.
A useful diagnostic workflow changes one source of numerical difficulty at a time and records what changes. Start with the data and parameter scales; then investigate optimization starts and local derivatives; assess curvature and integration accuracy; and finally inspect profiles for parameters that remain unstable. This sequence does not guarantee that a model is scientifically appropriate. It helps determine whether the reported fit is a reliable numerical representation of the likelihood under the specified model.
For subject \(i\), a shared-random-effects joint model commonly expresses the contribution to the observed-data likelihood as an integral over the subject-specific random effects \(b_i\). In a schematic notation,
Here \(y_i\) denotes the observed longitudinal measurements, \(T_i\) the observed event or censoring time, \(\delta_i\) the event indicator, and \(\theta\) the model parameters. The schematic assumes independent subjects, a specified random-effects distribution, and the stated conditional longitudinal and event-time models. In practice, numerical integration approximates \(L_i\), and an optimizer searches for a maximum of the resulting log likelihood. The workflow below checks both the statistical information in that likelihood and the numerical procedures used to evaluate and maximize it.
Stage 1: Check Data and Parameter Scales
First check units, ranges, missingness, and coding for both the longitudinal and event-time data. A time variable measured in days rather than years, or a biomarker recorded in very large units, can create parameters on sharply different numerical scales. Optimizers often work less reliably when a small parameter change in one coordinate has a vastly different effect on the objective than a comparable change in another.
Rescaling a predictor can improve numerical conditioning, but all coefficient interpretations must be translated back to the chosen units. For example, if \(x^*=x/100\), then \(\beta x=\beta^*x^*\) requires \(\beta^*=100\beta\). This is a change of parameter units, not new information in the data. Centering can also make an intercept more interpretable and reduce avoidable dependence between an intercept and slope. Do not rescale or recode silently: record the transformation and check that fitted predictions and likelihood values agree after translating parameters.
Worked Example: Rescaling a Longitudinal Predictor
Suppose a hypothetical model uses follow-up time \(t\) in days, and the fitted longitudinal mean includes \(\beta_t t\). The estimated slope is \(0.0024\) biomarker units per day. A team refits using \(t^*=t/100\), measured in hundreds of days, and obtains \(\beta_t^*=0.240\).
These values agree under the transformation: \(\beta_t^*/100=0.240/100=0.00240\) biomarker units per day. At day 250, the original contribution is \(0.0024(250)=0.600\); using the new scale it is \(0.240(2.5)=0.600\). If the two fits give materially different predicted means or log likelihoods after accounting for numerical approximation, the change is not merely a harmless unit conversion and warrants investigation.
Stage 2: Separate Starting-Value Problems from a Reliable Optimum
Fit from multiple substantively plausible starting values, using the same data, model, integration settings, and stopping tolerances. Compare the final log likelihoods, parameter estimates, convergence status, and diagnostics—not only whether the software prints “converged.” Competing solutions with similar likelihoods but substantially different parameters may indicate multiple optima or a likelihood that is poorly informative in some direction. A single successful run cannot rule this out.
When starts lead to different solutions, inspect whether the optimizer stopped at a boundary, encountered a non-finite objective, or terminated before the gradient was small. Reparameterizations that enforce constraints, such as a log scale for a positive variance, can prevent invalid trial values. They do not create information or resolve every weakly identified parameter.
Worked Example: Comparing Two Starting Values
In a hypothetical fit, two starts use identical numerical settings. Start A ends with \(\ell=-412.36\), a maximum absolute gradient component of \(0.0008\), and an association estimate of \(0.31\). Start B ends with \(\ell=-412.35\), a maximum absolute gradient component of \(0.0007\), and an association estimate of \(0.58\). Both report successful termination.
The log-likelihood difference is \((-412.35)-(-412.36)=0.01\), which is negligible at the displayed precision, while the association estimates differ by \(0.58-0.31=0.27\). The small gradients suggest both are stationary to the stated scale, but do not establish that either estimate is precisely determined. The appropriate conclusion is that the optimizer found similar objective values at materially different parameter values. Retain both solutions for further checks, including profiles and integration sensitivity; do not select one just because it is the preferred scientific result.
Stage 3: Check Gradients and Hessian Curvature
At a smooth interior maximum, the gradient of the log likelihood should be close to zero. Because parameters may have different units, inspect scaled or componentwise gradients as well as a single unscaled norm. A finite-difference gradient check compares numerical derivatives computed with more than one step size; a large discrepancy can reflect numerical noise, an implementation problem, or an unsuitable step size. The gradient is necessary evidence of local stationarity, not proof of a maximum.
The Hessian is the matrix of second derivatives of the log likelihood. At a well-behaved interior maximum, its curvature should be negative in every identifiable direction; equivalently, the observed information, often defined as the negative Hessian, should be positive definite. Near-zero curvature directions produce large uncertainty and sensitivity to small perturbations. Strong correlations among parameter estimates can also make the matrix poorly conditioned. If a parameter lies on a boundary, ordinary interior curvature interpretations and standard approximations may not apply.
Worked Example: Interpreting a Hessian Warning
Suppose a hypothetical fit reports an observed-information matrix whose eigenvalues, after parameters have been placed on comparable scales, are \(18.0,\ 4.2,\ 0.03,\) and \(-0.20\). Positive eigenvalues correspond to positive curvature of the negative log likelihood; the negative eigenvalue indicates a direction of negative curvature in the observed information.
Because one eigenvalue is negative, the matrix is not positive definite, so its inverse cannot be treated as a valid ordinary covariance estimate for an interior maximum. The small positive eigenvalue \(0.03\) also signals a nearly flat direction even if the negative eigenvalue were resolved. This is not fixed by merely reporting a larger standard error. Recheck stationarity, parameter constraints, scaling, and the local optimum; then assess whether the curvature changes under more accurate likelihood evaluation.
Stage 4: Test Integration Accuracy Before Trusting Fine Curvature
The likelihood integral over random effects is generally evaluated approximately. A fit can appear converged for a coarse approximation while the approximation itself shifts the objective, derivatives, or estimates. Refit with progressively more accurate integration settings appropriate to the method, holding other choices fixed. Compare estimates, log likelihoods, gradients, and uncertainty—not just whether each run converged. The comparison is informative only if the settings are genuinely more accurate for the model and the numerical method is otherwise comparable.
A useful check is whether the changes shrink as accuracy increases. If point estimates shift materially, or a Hessian warning appears only under one setting, conclusions based on that setting are not robust. Agreement across a finite number of settings supports numerical stability but cannot prove exact integration; especially difficult integrals may require additional checks.
Worked Example: Comparing Integration Settings
A hypothetical model is fitted with 7 and then 15 quadrature points per integration dimension. The estimated association parameter changes from \(0.42\) to \(0.44\), its standard error from \(0.18\) to \(0.19\), and the log likelihood from \(-305.7\) to \(-305.6\). Both runs have small gradients under their respective approximations.
The estimate changes by \(0.44-0.42=0.02\), about \(0.02/0.42=0.0476\), or \(4.76\%\) of the first estimate. The standard error changes by \(0.01\), and the log likelihood by \(0.1\). These results suggest modest sensitivity between the two settings, not proof that integration error is negligible. The next check is a further accuracy increase or an appropriate alternative integration method. If estimates continue to move, report the sensitivity and do not treat the first fit as settled.
Stage 5: Profile Parameters That Remain Unstable
A profile likelihood examines how well the model can fit when one parameter is fixed at a sequence of values and the other parameters are reoptimized. For parameter \(\psi\), define \(\ell_p(\psi)=\max_{\lambda}\ell(\psi,\lambda)\), where \(\lambda\) denotes the remaining parameters. A narrow, smooth maximum suggests that the likelihood localizes \(\psi\); a flat, asymmetric, or irregular profile suggests that its estimate may be weakly determined, near a boundary, or affected by numerical problems.
Use the same sufficiently accurate likelihood evaluation at every profile point, and check that nuisance parameters are actually reoptimized. Failed optimization at individual points can make a profile look artificially jagged or too low. For a regular interior parameter, likelihood-ratio differences are sometimes compared with a chi-squared reference distribution with one degree of freedom; boundary cases or other violations require different care. A profile is a diagnostic, not a cure for poor fit or model misspecification.
Putting the Workflow Together
Confirm units, ranges, and transformations; verify that rescaled parameter estimates reproduce the same fitted quantities.
Hold numerical settings fixed and compare objective values, estimates, boundaries, and termination diagnostics.
Check gradient size and Hessian behavior at candidate solutions, accounting for parameter scales and boundary constraints.
Change integration settings systematically and check whether estimates, uncertainty, and objective values stabilize.
Reoptimize other parameters at fixed values and distinguish a genuinely broad likelihood from optimization failures along the profile.
The stages complement rather than replace one another. Multiple starts test the search over the likelihood; gradient and Hessian checks assess the local solution; integration comparisons assess the objective’s numerical approximation; and profiles show how the likelihood behaves as a parameter varies. Simulation-based recovery and bootstrap stability answer related but different questions: they examine behavior under generated or resampled data, not whether a particular observed-data fit was numerically optimized accurately.
Common Pitfalls and Limits
- Equating a convergence message with a trustworthy fit. A termination rule can be met at a saddle point, boundary, or poorly determined solution. Check gradients, curvature, and sensitivity as well.
- Changing many settings at once. If the estimate changes after altering scaling, starts, tolerances, and quadrature together, the source is unclear. Change one factor at a time where practical.
- Using a small gradient as a precision measure. A gradient near zero says the objective is locally stationary; it does not say the likelihood is sharply curved or the estimate is precise.
- Ignoring units in a scale comparison. Raw coefficients can differ greatly after rescaling even when fitted values are identical. Compare transformed parameters and predictions.
- Treating instability as proof of model failure. Numerical instability may arise from optimization or integration. Conversely, a numerically stable fit can still be based on a misspecified model.
No single diagnostic resolves every case. Near-boundary parameters, complex random-effects structures, limited event information, or a highly irregular likelihood may defeat standard local approximations. If the checks disagree, preserve the evidence, simplify or reparameterize only with scientific justification, and avoid presenting a single unstable estimate as definitive.
Check Your Understanding
Answer each question, then compare with the concise solutions below.
- After rescaling time from days to hundreds of days, the slope coefficient changes by a factor of 100 but predictions are unchanged. Is this alone evidence of instability?
- Two starts have nearly identical log likelihoods but substantially different association estimates. What should be checked next?
- Why does a near-zero gradient not establish that a reported standard error is reliable?
- A fit changes as quadrature accuracy increases. What does this imply, and what is a sensible next step?
- What does a broad parameter profile indicate, and what additional check is needed if the profile is jagged?
Solutions. (1) No. If coefficients transform consistently and fitted values agree, the difference reflects units. (2) Retain both solutions and inspect gradients, curvature, and parameter profiles; do not choose based on preference alone. (3) A gradient assesses stationarity, whereas uncertainty depends on curvature and its validity. (4) The result is integration-sensitive at the tested settings; increase accuracy or compare an appropriate alternative while holding other choices fixed. (5) The likelihood may not localize the parameter well; verify that each profile point converged and nuisance parameters were reoptimized before interpreting irregularity.