Tutorials › Generalized Linear Mixed Models (GLMM) › Profile Likelihood for Random-Effect Variances

Testing Fixed and Random Effects · Tutorial 381 of 698

Profile Likelihood for Random-Effect Variances

You will learn to profile nuisance parameters, interpret likelihood support near a zero variance, and report a boundary-limited confidence set without relying on a symmetric Wald interval.

Advanced 12 min read

What You'll Learn

  • Define the profile log likelihood for a random-effect variance in a GLMM.
  • Calculate and interpret the likelihood-ratio curve from profile log-likelihood values.
  • Explain why nonnegative parameter space and changing curvature produce asymmetric profiles.
  • Construct a boundary-limited likelihood-ratio confidence set using an explicitly calibrated cutoff.
  • Diagnose flat, irregular, or optimizer-sensitive profiles and distinguish profiling from Wald inference.

Why Profile a Variance Component?

A random-effect variance describes the amount of between-cluster variation represented by that random effect. Its parameter space begins at zero: a variance cannot be negative. When the data suggest little variation, an estimate may lie at or near that boundary. In this setting, a symmetric uncertainty summary can be misleading: it may extend below zero, and the likelihood need not fall at the same rate on either side of its maximum.

A profile likelihood makes the uncertainty visible directly. It fixes the variance at a sequence of plausible values and, at each value, optimizes the remaining model parameters. The resulting curve shows how much likelihood support remains as the variance moves away from its best-fitting value. This is especially useful for seeing whether zero remains plausible and whether the upper end of a likelihood-based confidence set is far from its lower end.

Definition: Let \(\tau\geq 0\) be a random-effect variance, and let \(\eta\) denote all other model parameters, including fixed effects and any other variance or covariance parameters. If \(\ell(\tau,\eta)\) is the GLMM marginal log likelihood, the profile log likelihood for \(\tau\) is $$ \ell_p(\tau)=\max_{\eta}\ell(\tau,\eta). $$ The profile likelihood-ratio curve is $$ D(\tau)=2\{\ell_p(\hat{\tau})-\ell_p(\tau)\}, $$ where \(\hat{\tau}\) maximizes \(\ell_p(\tau)\) over \(\tau\geq 0\). Smaller \(D(\tau)\) means that fixing the variance at \(\tau\) costs less log likelihood relative to the best-fitting variance.

In a GLMM, the marginal likelihood is obtained by integrating over the random effects under the specified random-effects distribution. Profiling does not replace that integration with estimates of the random effects. Instead, it optimizes over nuisance model parameters after evaluating the marginal likelihood. It also does not average over nuisance parameters, as a Bayesian marginal likelihood would.

How to Read the Curve

The horizontal axis is the variance \(\tau\), measured in squared units of the random effect. For a random intercept in a logistic model, for example, the intercept is on the log-odds scale, so its variance is in squared log-odds units. The vertical axis \(D(\tau)\) is dimensionless. It is zero at the maximum and increases as the fixed variance fits less well.

A likelihood-based confidence set is formed by retaining variance values whose likelihood-ratio statistic does not exceed a chosen cutoff \(c\):

$$ \mathcal{C}=\{\tau\geq 0:D(\tau)\leq c\}. $$

The cutoff is not automatically the ordinary chi-square cutoff in every variance-component problem. At a boundary, usual regularity conditions for a likelihood-ratio reference distribution fail. The cutoff should come from an inferential calibration appropriate to the model, design, and target coverage. The familiar boundary mixture for testing a single variance equal to zero is one relevant reference result, but it does not justify treating one fixed cutoff as universally valid for every point in a confidence set. In the examples below, any stated cutoff is supplied as part of the hypothetical analysis.

Worked Example: A Profile Set That Begins at Zero

Suppose a hypothetical binary-outcome GLMM estimates the variance of a cluster-level random intercept. The fitted variance is \(\hat{\tau}=0.04\) squared log-odds units, and the maximized profile log likelihood is \(-82.10\). The table gives profile log likelihoods at selected values. For this hypothetical analysis, assume a boundary-aware procedure has supplied the cutoff \(c=3.00\) for the stated 95% likelihood-based set.

\(\tau\) (squared log-odds units)\(\ell_p(\tau)\)\(D(\tau)=2\{\ell_p(0.04)-\ell_p(\tau)\}\)
0.00-83.252.30
0.02-82.2250.25
0.04-82.100.00
0.08-82.340.48
0.15-82.691.18
0.27-83.4552.71
0.40-84.404.60

For example, at \(\tau=0\), $$ D(0)=2\{-82.10-(-83.25)\}=2(1.15)=2.30. $$ This is below 3.00, so zero is retained. At \(\tau=0.40\), $$ D(0.40)=2\{-82.10-(-84.40)\}=2(2.30)=4.60, $$ which exceeds the cutoff, so 0.40 is excluded.

The curve crosses the cutoff between 0.27, where \(D=2.71\), and 0.40, where \(D=4.60\). Linear interpolation gives an approximate upper crossing: $$ 0.27+\frac{3.00-2.71}{4.60-2.71}(0.40-0.27) =0.290. $$ The retained set therefore runs from the parameter-space boundary to an upper endpoint of about 0.29 squared log-odds units. There is no negative lower endpoint to report. Under the stated calibration, the interpretation is that the likelihood-based 95% set for this variance is approximately \([0,0.29]\) squared log-odds units. It does not mean there is a 95% probability that the fixed parameter lies in this realized interval.

Why the Profile Is Often Asymmetric

There are two connected reasons. First, the parameter is restricted to \(\tau\geq 0\). If the best fit is close to zero, the curve cannot extend into negative variance values; the side of the maximum facing zero may be cut off by the boundary. Second, even away from that restriction, the log likelihood need not be a quadratic function of the variance over the range that matters. A quadratic approximation may describe a narrow neighborhood of an interior maximum, but profiling nuisance parameters can change the curvature as \(\tau\) changes. The curve can therefore decline steeply on one side and gradually on the other.

The corresponding confidence set may have zero as its lower endpoint and a relatively distant upper endpoint. If the maximum itself occurs at zero, the set can still extend a substantial distance to the right: the estimate is on the boundary, but nearby positive variances may fit almost as well. A boundary estimate is not equivalent to evidence that every positive variance is implausible.

Justification: A profile likelihood-ratio set retains \(\tau\) when its likelihood loss is no larger than the chosen cutoff. Because the admissible values satisfy \(\tau\geq 0\), the set can never extend below zero. If \(D(0)\leq c\), zero is retained and the lower endpoint is exactly zero. If \(D(0)>c\), zero is excluded and, when the retained set is a single interval, its lower endpoint is a positive value where the curve crosses \(c\). This conclusion follows from the constraint and the cutoff rule; it does not require a symmetric approximation.

Worked Example: Comparing a Wald Interval with a Profile Set

Use the estimate \(\hat{\tau}=0.04\) squared log-odds units from the previous example. Suppose a local Wald calculation reports \(SE=0.07\) squared log-odds units. A symmetric 95% Wald interval is $$ 0.04\pm 1.96(0.07)=0.04\pm 0.1372=[-0.0972,\ 0.1772]. $$

The negative lower endpoint is outside the variance parameter space. Truncating it at zero produces \([0,0.1772]\), but this does not make the Wald interval equivalent to the profile set. The example's profile set, using its specified calibration, is approximately \([0,0.29]\). The difference arises because the Wald interval uses one estimated standard error and a symmetric local approximation, whereas the profile set follows the fitted likelihood across candidate variances. The two calculations also require their own appropriate calibration; comparing their endpoints does not by itself establish which has better coverage.

The correct conclusion is not that the variance must be zero because the Wald interval crossed zero. Rather, a negative variance is inadmissible, and the likelihood profile should be examined with boundary-appropriate inference. In this example the profile retains zero while also allowing positive variances up to approximately 0.29 under the stated procedure.

Finding an Upper Endpoint When the Estimate Is Zero

A profile can have its maximum at the boundary. In that case, the likelihood-based set may have the form \([0,U]\): the lower endpoint is fixed by the parameter space, while the upper endpoint is determined by where the curve reaches the cutoff. The estimate at zero alone does not convey how large \(U\) is.

Worked Example: An Upper Limit from a Boundary Maximum

In a second hypothetical GLMM, suppose the maximized profile log likelihood occurs at \(\hat{\tau}=0\), with \(\ell_p(0)=-51.00\). A supplied calibration specifies \(c=2.71\) for the set being reported. At \(\tau=0.05\), the profile log likelihood is \(-51.90\), and at \(\tau=0.08\), it is \(-52.38\).

The likelihood-ratio values are $$ D(0.05)=2\{-51.00-(-51.90)\}=1.80 $$ and $$ D(0.08)=2\{-51.00-(-52.38)\}=2.76. $$ Thus 0.05 is retained and 0.08 is just beyond the cutoff. Linear interpolation places the crossing at $$ 0.05+\frac{2.71-1.80}{2.76-1.80}(0.08-0.05) =0.0784. $$ The approximate set is \([0,0.078]\) in the variance's squared units. The fitted value is zero, but the set still includes small positive variances. The upper limit, not the boundary estimate alone, communicates how much positive variation remains compatible with the chosen likelihood criterion.

Construction, Diagnostics, and Alternatives

1
Specify the model and parameter.
Name the random-effect variance \(\tau\), its units, the other parameters to be profiled, and the likelihood being used. The random-effects distribution and the rest of the GLMM must be specified correctly enough for the likelihood to be meaningful.
2
Fit across a nonnegative grid.
Choose candidate values including zero and a sufficiently wide range of positive values. At each value, hold \(\tau\) fixed and maximize the marginal log likelihood over nuisance parameters. Use stable optimization and check whether repeated starts give the same maximum.
3
Form the likelihood-ratio curve.
Find the largest profile log likelihood and compute \(D(\tau)=2\{\ell_p(\hat{\tau})-\ell_p(\tau)\}\). Confirm that the curve is nonnegative up to numerical error and is zero at the best-fitting value.
4
Apply an appropriate cutoff.
Use a stated calibration suited to the variance-component boundary and the inferential target. Locate the values where \(D(\tau)=c\), include zero only if it meets the criterion, and report the set with units and calibration.

Several features warrant investigation rather than automatic interpretation. A curve that changes sharply between grid points may need a finer grid near its cutoff crossings. A flat curve over a broad range indicates weak information about the variance: the data distinguish neither nearby values nor a precise upper limit. A profile that jumps irregularly, has multiple apparent maxima, or changes materially with optimizer starting values may signal numerical failure, an ill-conditioned model, or a poorly identified parameter. Refit at suspected crossings and verify that nuisance-parameter optimization converged at every fixed value.

The main contrast is with Wald inference. Wald methods use an estimate and an estimated standard error to create a locally symmetric approximation; profiling uses likelihood loss and respects the nonnegative domain. A likelihood-ratio test of a fixed variance is another related approach, but it answers a testing question at a specified value, whereas the profile curve displays fit over a range and can be inverted into a set. Neither profiling nor a plotted curve repairs a misspecified random-effects distribution, sparse information, or inadequate numbers of independent clusters. A visually smooth profile is not proof that the model is correct.

Common Mistakes and Limitations

  • Reporting a negative variance endpoint. A symmetric approximation can produce one, but variance values must satisfy \(\tau\geq 0\). Report a boundary-limited set or use an appropriate method, not an inadmissible negative variance.
  • Assuming every likelihood curve is symmetric. The parameter boundary and changing profile curvature can produce strong asymmetry. Do not infer both endpoints from one standard error.
  • Using a default chi-square cutoff without checking the setting. Variance zero is a boundary point, where standard regular likelihood-ratio theory can fail. State how the cutoff was calibrated; do not claim a nominal confidence level without justification.
  • Confusing a zero estimate with a zero upper limit. A boundary maximum can coexist with appreciable likelihood support for positive variances. Inspect the curve and its upper crossing.
  • Treating a numerical profile as automatically reliable. Failed optimization at some fixed values can create false bumps or crossings. Check convergence, starting values, and grid resolution.

Profile likelihood is useful because it makes the shape of support for a variance component inspectable and exposes the consequences of the boundary. Its limitations remain important: the likelihood depends on the model and its assumptions, and the confidence set's coverage depends on a valid calibration. The curve is evidence about fit under the specified GLMM, not a guarantee that the random-effects structure is scientifically adequate.

Check Your Understanding

Answer each question using the profile-likelihood definitions and boundary rules above.

  1. At a candidate variance, \(\ell_p(\hat{\tau})=-40.2\) and \(\ell_p(\tau)=-41.0\). Calculate \(D(\tau)\).
  2. A profile has \(D(0)=1.4\) and a supplied cutoff \(c=2.8\). Is zero retained in the likelihood-based set?
  3. Why can a Wald interval for a variance have a negative endpoint even though the parameter is nonnegative?
  4. A fitted variance is zero, but the profile crosses its cutoff at a positive value \(U\). What should the reported set communicate?
  5. Name two checks that can help diagnose a numerically unreliable profile.

Solutions. (1) \(D=2\{-40.2-(-41.0)\}=1.6\). (2) Yes, because \(1.4\leq2.8\), so zero meets the likelihood-set rule. (3) A Wald interval adds and subtracts a symmetric multiple of an estimated standard error without enforcing the parameter constraint. (4) Report a boundary-limited set beginning at zero and ending at the positive cutoff crossing, with units and calibration; the zero estimate does not eliminate positive values. (5) Examples include repeating optimization from multiple starting values, checking convergence at each fixed variance, and refining the grid near abrupt changes or cutoff crossings.

Clinical Biostats