Tutorials › Generalized Linear Mixed Models (GLMM) › Profile Likelihood as a Boundary Diagnostic

Convergence, Singular Fits and Boundary Estimates · Tutorial 308 of 698

Profile Likelihood as a Boundary Diagnostic

You will learn how to profile a random-effect variance, interpret the resulting likelihood curve near zero, and distinguish boundary support from weak information.

Advanced 12 min read

What You'll Learn

  • Define a profile likelihood for a random-effect variance by maximizing over nuisance parameters.
  • Interpret likelihood-ratio contours, curvature, asymmetry, and a maximum at the zero boundary.
  • Understand why ordinary chi-square cutoffs need care for variance components at zero.
  • Compare a profile likelihood with a Wald interval for the variance and with a fixed-nuisance likelihood slice.
  • Recognize profiles that indicate weak information rather than clear evidence of zero variance.
  • Use a reproducible grid-and-refit procedure to inspect the profile.

Why Profile a Random-Effect Variance?

A random-effect variance is constrained to be nonnegative. When its maximum-likelihood estimate is near zero, a symmetric approximation around the estimate can be misleading: it can extend into impossible negative values, and it may not reflect the shape of the likelihood. A profile likelihood makes that shape visible. It also shows whether a maximum at zero is sharply supported by the data or whether the likelihood changes so little across a range of variances that the estimate is weakly determined.

This is a diagnostic, not a stand-alone verdict about whether a random effect belongs in a model. The profile depends on the specified model and data, and its interpretation depends on both the curve and the conditions under which likelihood-based inference is being used.

Definition and Assumptions

Consider a GLMM with observations grouped into clusters. Conditional on a cluster’s random effect, the observations follow the specified response distribution and link model; the random effects follow the specified distribution, commonly a multivariate normal distribution. Assume clusters are independent, the model is identified well enough for the likelihood to be evaluated, and the variance parameter of interest is constrained to \(v\geq 0\). Here \(v\) denotes one random-effect variance, such as a random-intercept variance. Other model parameters are denoted collectively by \(\eta\); these include fixed effects and any other variance or covariance parameters.

The likelihood used below is the marginal likelihood: random effects are integrated out, rather than treated as observed data. For an exact likelihood, this is the likelihood of the observed responses under the GLMM. If a fitting method uses an approximation to that likelihood, the same approximation and fitting conventions must be used consistently at every fixed value of \(v\). In either case, the curve diagnoses the fitted likelihood being examined; it does not establish that the model or approximation is correct.

Definition: The profile log-likelihood for \(v\) is the log-likelihood at \(v\), maximized over all nuisance parameters: $$ \ell_p(v)=\max_{\eta}\ell(v,\eta),\qquad v\geq 0. $$ The profile likelihood is \(L_p(v)=\exp\{\ell_p(v)\}\). A useful relative-likelihood measure is the profile likelihood-ratio deviance $$ q(v)=2\{\ell_p(\hat v)-\ell_p(v)\}, $$ where \(\hat v\) is the value maximizing \(\ell_p(v)\) over \(v\geq 0\). Smaller \(q(v)\) means greater support relative to the maximum; \(q(v)\geq 0\).

At each candidate variance \(v\), nuisance parameters are re-estimated. Thus, the profile curve allows fixed effects and other variance parameters to adapt to that value of \(v\). Holding them at their estimates from the unrestricted fit instead produces a likelihood slice, not a profile likelihood.

Constructing and Reading the Profile

A practical construction evaluates a grid of nonnegative variance values, refits the nuisance parameters at each grid point, and records the maximized log-likelihood. The grid should be sufficiently fine near zero and around the maximum to show relevant curvature. It should also extend far enough to reveal whether the likelihood falls appreciably at larger variances. Refitting from more than one starting point can help distinguish a genuine profile shape from a failed nuisance-parameter maximization.

1
Choose the target variance.
Specify which random-effect variance \(v\) is being assessed, its scale, and its allowed range \(v\geq 0\).
2
Fix one grid value at a time.
For each \(v\), hold that variance fixed and maximize the likelihood over all nuisance parameters \(\eta\).
3
Compare with the maximum.
Identify \(\hat v\), then calculate \(q(v)=2\{\ell_p(\hat v)-\ell_p(v)\}\) at each grid point.
4
Assess shape and boundary support.
Inspect whether the maximum is at zero or positive, how quickly the curve falls, whether it is asymmetric, and whether it remains nearly flat over a broad range.

The factor of 2 in \(q(v)\) gives the conventional likelihood-ratio scale. Under regular large-sample conditions, when the true parameter is an interior point and the nuisance parameters are identifiable, \(q(v)\) is approximately compared with a chi-square distribution with one degree of freedom for a one-parameter likelihood-ratio interval. That familiar approximation is not automatically valid at \(v=0\): zero is on the boundary of the parameter space, and variance-component testing has nonstandard boundary behavior. In the simplest regular one-component test, a mixture involving a point mass at zero and a chi-square distribution can arise; more complex GLMM settings may require problem-specific calibration. Treat a conventional contour near zero as descriptive unless an appropriate inferential calibration has been justified.

Worked Examples

Worked Example: A Maximum at Zero with a Rapidly Falling Profile

Suppose a hypothetical binary-outcome random-intercept GLMM is fit, with \(v\) the random-intercept variance on the logit scale, in squared log-odds units. Nuisance parameters are refit at each grid point, and the resulting profile values are:

\(v\)00.100.200.40
\(\ell_p(v)\)-112.40-112.80-113.50-114.70

The largest profile log-likelihood is \(-112.40\), at \(v=0\), so \(\hat v=0\). For \(v=0.20\), $$ q(0.20)=2\{(-112.40)-(-113.50)\}=2(1.10)=2.20. $$ For \(v=0.40\), $$ q(0.40)=2\{(-112.40)-(-114.70)\}=2(2.30)=4.60. $$ The profile falls as variance increases, and its loss by \(v=0.40\) is appreciable on the likelihood-ratio scale. This supports the description that the fitted likelihood favors the boundary over these larger variances. It does not prove that the population variance is exactly zero. For illustration only, the usual interior 95% contour uses \(q=3.84\); linear interpolation between \(q(0.20)=2.20\) and \(q(0.40)=4.60\) places that contour at approximately \(0.20+(3.84-2.20)(0.20)/(4.60-2.20)=0.337\). Because the maximum is at a boundary, that number is not automatically a calibrated 95% upper confidence limit.

Worked Example: An Interior Maximum with an Asymmetric Profile

In a second hypothetical GLMM, \(v\) is a random-intercept variance measured in squared log-odds units. The profile log-likelihood has its maximum \(-80.00\) at \(v=0.16\). At zero it is \(-82.20\), at \(v=0.04\) it is \(-80.90\), at \(v=0.36\) it is \(-81.00\), and at \(v=0.64\) it is \(-82.40\). The estimate is positive, and the profile is not symmetric around it.

At zero, the likelihood-ratio deviance is $$ q(0)=2\{(-80.00)-(-82.20)\}=4.40. $$ At \(v=0.04\), it is $$ q(0.04)=2\{(-80.00)-(-80.90)\}=1.80. $$ On the upper side, \(q(0.36)=2\{(-80.00)-(-81.00)\}=2.00\), while \(q(0.64)=2\{(-80.00)-(-82.40)\}=4.80\). Thus, the rise in \(q\) is not the same on the two sides of the maximum. Using the conventional interior contour \(q=3.84\) only for illustration, linear interpolation gives a lower crossing of \(0.04+(4.40-3.84)(0.04)/(4.40-1.80)\approx 0.0486\), and an upper crossing of \(0.36+(3.84-2.00)(0.28)/(4.80-2.00)\approx 0.544\). This rough contour is asymmetric around \(0.16\). It illustrates why the profile can convey more about uncertainty than a symmetric Wald interval for the variance. Exact interval endpoints require a sufficiently fine profile and a suitable calibration; interpolation here is only an approximation.

Worked Example: A Nearly Flat Profile Near the Boundary

Suppose a third hypothetical model gives \(\ell_p(0)=-65.02\), \(\ell_p(0.05)=-65.00\), \(\ell_p(0.20)=-65.04\), and \(\ell_p(0.50)=-65.12\), with all values in log-likelihood units. The maximum is \(-65.00\) at \(v=0.05\), so the estimate is close to zero but not exactly on the boundary.

The relative deviance at zero is \(q(0)=2\{(-65.00)-(-65.02)\}=0.04\), and at \(v=0.50\) it is \(q(0.50)=2\{(-65.00)-(-65.12)\}=0.24\). These small differences show that the likelihood changes little over the displayed range. The estimate being near zero does not, by itself, show strong support for a zero variance. The profile instead indicates weak information about \(v\) across that range; additional data or a carefully considered model may be needed to learn more. A broader grid should be examined before concluding that the likelihood remains flat at larger values.

What the Shape Does and Does Not Tell You

A steep, clearly peaked profile indicates that relatively small changes in \(v\) cause a noticeable likelihood loss. A broad, flat profile indicates that a range of values fits almost as well as the maximum. An asymmetric profile indicates that a symmetric local approximation may describe the two sides differently. A maximum at zero tells you that the maximum-likelihood estimate lies on the allowed boundary; the curve away from zero tells you how much support is lost as the variance increases.

These descriptions are conditional on the fitted model. A profile is not a direct measure of practical importance, and a likelihood maximum at zero is not proof that clusters have identical underlying risks. Nor does a curve alone establish that the random-effects distribution, link, fixed-effects specification, or likelihood approximation is appropriate. For formal intervals or tests, choose a calibration that accounts for the boundary and the inferential question.

Alternatives, Diagnostics, and Limitations

ApproachWhat it providesMain caution
Profile likelihoodLikelihood shape after nuisance parameters are re-estimated at each target varianceBoundary inference needs suitable calibration; refits must be reliable
Wald interval for the varianceA local, approximately symmetric interval based on an estimated standard errorNear zero it may extend below zero or poorly represent skewness and boundary behavior
Likelihood slice with nuisance parameters fixedA quick view of likelihood change when only the target variance movesIt is not a profile and can misrepresent uncertainty because nuisance parameters cannot adapt

The standard-error-based Wald interval for the variance is particularly questionable when the estimate is near zero: a symmetric construction can imply negative variance values even though \(v\geq 0\). This is a limitation of that interval for the variance, not a comparison with a Wald interval for a fixed effect. A profile interval can respect the parameter range and display asymmetry, but it still requires an inferential cutoff justified for the setting.

Several features suggest that a computed profile should be treated cautiously. Large jumps or irregular reversals across adjacent grid points can signal inadequate grid resolution or inconsistent maximization. If the supposed profile maximum is lower than a likelihood found by the unrestricted fit, the computations are inconsistent because the unrestricted fit is among the possible parameter values. If a nuisance fit fails at particular grid points, the resulting curve may reflect fitting failure rather than the likelihood. Repeating fits and refining the grid near sharp changes help distinguish these issues. A profile that remains flat over the examined range should prompt expansion of the grid, not a claim that the variance is precisely zero.

The method also has limits: it can be computationally demanding because each grid point requires a nuisance-parameter fit, and the result depends on the model’s likelihood. Profiles of one variance at a time do not automatically resolve confounding among several variance components. They are most useful as a transparent diagnostic of curvature, asymmetry, and boundary support, alongside other checks of the fitted model.

Common Mistakes

  • Holding nuisance parameters fixed. That gives a likelihood slice, not the profile likelihood. Refit the nuisance parameters at each fixed variance.
  • Calling a boundary estimate proof of no heterogeneity. A maximum at zero is an estimate under the specified model; inspect how quickly the profile falls and how the boundary inference is calibrated.
  • Using an ordinary chi-square cutoff automatically at zero. The usual one-degree-of-freedom approximation is an interior result. Boundary cases can have nonstandard distributions.
  • Using a symmetric Wald interval for the variance without checking its behavior. Near zero it may include impossible negative values and hide profile asymmetry.
Key takeaway: A profile likelihood for a random-effect variance is formed by fixing that variance and maximizing over the remaining parameters. Its shape distinguishes a sharply supported boundary estimate from a near-boundary estimate with little information, but formal inference at zero requires boundary-aware calibration.

Check Your Understanding

Answer each question, then compare your reasoning with the solutions.

  1. At a fixed value of \(v\), which parameters are optimized when constructing \(\ell_p(v)\)?
  2. A fitted profile has \(\ell_p(\hat v)=-50.0\) and \(\ell_p(v)=-51.3\). Calculate \(q(v)\).
  3. Why can a Wald interval for the variance be misleading when the variance estimate is near zero?
  4. What does a nearly flat profile over a wide range of nonnegative variances suggest?
  5. Why should the usual one-degree-of-freedom likelihood-ratio cutoff be treated cautiously when the maximum is at \(v=0\)?

Solutions. (1) Optimize all nuisance parameters, including fixed effects and other variance or covariance parameters, while holding \(v\) at the chosen value. (2) \(q(v)=2\{(-50.0)-(-51.3)\}=2(1.3)=2.6\). (3) A symmetric interval may extend below zero, which is outside the parameter space, and may not represent the profile’s skewness or boundary behavior. (4) The data provide weak information to distinguish values across that range; it is not evidence by itself that the true variance is exactly zero. (5) Zero is a boundary, not an interior parameter value, so the regular chi-square approximation need not apply; use a boundary-appropriate calibration for formal inference.

Clinical Biostats