Tutorials › Generalized Linear Mixed Models (GLMM) › Random-Effect Variance Estimates Near Zero

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

Random-Effect Variance Estimates Near Zero

Use the scale of the variance, nearby likelihood values, and optimization diagnostics to judge whether a near-zero random-effect variance is credible or reflects a fit that needs further investigation.

Advanced 12 min read

What You'll Learn

  • Explain why a random-effect variance of zero is a valid boundary value in a GLMM.
  • Translate a small variance estimate into a standard deviation and an appropriate contextual scale.
  • Compare fitted likelihoods at zero and nearby variance values without treating tiny differences as decisive evidence.
  • Combine optimizer agreement, convergence checks, and likelihood behavior when assessing a boundary estimate.
  • Recognize when rounding, parameterization, or numerical instability can make a near-zero estimate misleading.

Why a Near-Zero Estimate Needs Interpretation

A random-effect variance estimate close to zero can mean that the fitted model finds little evidence of variation across groups for that random effect. It can also arise when the likelihood is nearly unchanged over a range of small values, when the estimate is rounded for display, or when optimization has not reliably located the maximum. The number alone does not distinguish these possibilities.

The key question is therefore not simply whether the estimated variance is “small.” Ask what it means on the scale of the random effect, whether the likelihood supports the fitted value relative to zero and nearby values, and whether independent optimization checks give a consistent result. These checks assess the numerical credibility of the fit; they do not by themselves establish that the random effect is substantively unnecessary.

Model and Boundary Value

For clarity, consider a GLMM with a random intercept for group \(j\). Given the random intercept \(b_j\), observations in group \(j\) follow a specified response distribution with mean determined by a linear predictor such as \(\eta_{ij}=x_{ij}^{\mathsf T}\beta+b_j\). The random intercepts are assumed independent across groups and normally distributed, \(b_j\sim N(0,\tau^2)\), and conditionally independent observations follow the chosen GLM response model. The variance parameter must satisfy \(\tau^2\geq 0\). The same boundary issue applies to other random-effect variance parameters.

Definition: A boundary estimate occurs when a variance parameter is estimated at its smallest permitted value, zero. A near-boundary estimate is a small positive estimate whose interpretation depends on the random effect’s units, the likelihood near zero, and the stability of the numerical fit. “Near zero” has no universal numerical cutoff.

At \(\tau^2=0\), the random intercept has no variation: the model reduces to the corresponding model without that random intercept. This is a valid point in the parameter space, not an illegal negative variance or a numerical error by definition. A reported estimate such as \(0.000\) may also be a small positive internal estimate rounded to three decimal places. Inspect unrounded output when available.

Variance units are squared units of the random effect. Its standard deviation, \(\tau=\sqrt{\tau^2}\), is often easier to interpret. For a logistic random-intercept model, one may also describe the variance using a latent-scale intraclass correlation approximation, \(\tau^2/(\tau^2+\pi^2/3)\). That summary is specific to the logistic latent-variable convention; it does not replace examining the fitted model or its likelihood.

A Likelihood Check at the Boundary

Let \(\ell_p(\tau^2)\) denote the profile log likelihood: for each fixed value of \(\tau^2\), maximize the log likelihood over the other model parameters. The maximum-likelihood estimate is a value of \(\tau^2\) that maximizes this function over \([0,\infty)\). When diagnosing a near-zero estimate, compare the fitted value with zero and with a small set of nearby, scientifically interpretable values. Each comparison should refit the other parameters and use the same likelihood approximation and numerical settings.

The boundary has a simple local justification. If the right derivative of the profile log likelihood exists at zero, a small positive change \(h\) satisfies the first-order approximation \(\ell_p(h)\approx\ell_p(0)+h\ell_p'(0+)\). If \(\ell_p'(0+)<0\), moving slightly into the allowable parameter space reduces the log likelihood, which is consistent with a local maximum at zero. If the derivative is positive, the likelihood initially increases away from zero, so zero is not a local maximum. In practice the derivative may be difficult to estimate accurately near a boundary; the approximation explains the direction of the check, not a substitute for reliable optimization.

$$ \ell_p(h)=\ell_p(0)+h\ell_p'(0+)+o(h),\qquad h\downarrow 0 $$

A likelihood difference is a diagnostic quantity, not automatically a hypothesis-test result. In particular, do not apply an ordinary interior-parameter likelihood-ratio reference distribution mechanically to a variance tested at zero: zero is on the boundary, and the inferential reference distribution requires appropriate boundary theory and conditions. Here the purpose is narrower: determine whether the numerical fit and likelihood behavior are compatible with a credible estimate near the boundary.

Worked Example: A Near-Zero Logistic Random-Intercept Variance

Suppose a hypothetical study records a binary outcome for 600 patients in 30 clinics. A logistic random-intercept GLMM is fitted under the assumptions above: independent clinic random intercepts, the specified conditional Bernoulli response model, and the same fixed effects and integration settings in each comparison. The fitted clinic-intercept variance is \(0.0004\), and the corresponding profile log likelihoods are \(-812.416\) at zero, \(-812.415\) at \(0.0004\), and \(-812.417\) at \(0.0016\).

The estimated standard deviation is \(\hat{\tau}=\sqrt{0.0004}=0.020\) log-odds units. The likelihood at the fitted value exceeds the likelihood at zero by only \(0.001\). The corresponding likelihood ratio is \(\exp\{2[-812.415-(-812.416)]\}=\exp(0.002)\approx1.002\). Thus, on this reported likelihood scale, the fitted value and zero have almost indistinguishable likelihoods. This calculation does not prove the variance is zero; it says that this comparison provides almost no numerical separation between the two values.

For the logistic latent-scale summary, the estimated intraclass correlation is approximately \[ \frac{0.0004}{0.0004+\pi^2/3} \approx\frac{0.0004}{3.2899} \approx0.000122. \] This is a very small latent-scale fraction. Together with the small standard deviation and the nearly equal likelihoods, it makes a boundary-level variance plausible. Before concluding that the fit is stable, one would still check the unrounded estimate, convergence information, and whether repeated optimization gives essentially the same likelihood and fixed-effect estimates.

Combine Likelihood and Optimizer Diagnostics

A credible boundary estimate is supported by a coherent pattern of evidence, not a single software message. Examine the optimizer’s convergence status, scaled gradient, Hessian or curvature checks, and sensitivity to reasonable restarts or alternative optimizers. These diagnostics should be interpreted using the same model and likelihood approximation. A small gradient and reproducible solution are reassuring, but a variance at a boundary can make ordinary curvature-based checks delicate; a warning should be investigated rather than dismissed because the estimate is small.

Compare likelihood values at zero, the reported estimate, and nearby values while re-optimizing nuisance parameters. If the profile is shallow, nearby estimates may differ slightly without meaningfully changing fit. If the displayed variance is rounded, inspect more digits. Also check the variance on its original scale and its standard deviation on the random-effect scale: optimizer parameters may instead be represented by a transformed quantity, so a small number in the optimization output is not necessarily the variance itself.

1
Verify the reported scale.
Confirm that the output is a variance, not a standard deviation or a transformed optimizer parameter; obtain unrounded values when possible.
2
Put the estimate in context.
Take the square root to obtain the random-effect standard deviation and state its units. Use a model-specific scale summary only when its assumptions and convention are appropriate.
3
Compare nearby likelihoods.
Refit at zero and at small positive values using consistent settings. Note whether the likelihood meaningfully distinguishes them; do not turn a tiny difference into a claim of certainty.
4
Check numerical reproducibility.
Review convergence, gradients, curvature, and reasonable restarts or optimizer comparisons. Investigate material changes in likelihood or other estimates.

Worked Example: A Small Random-Slope Variance with Stable Fits

Consider hypothetical repeated binary outcomes from 40 clinics, with a random slope for a continuous predictor measured in units of ten minutes. Assume the conditional response model and random-effects distribution are correctly specified for this diagnostic exercise, and use identical quadrature settings. Three reasonable optimizer runs return slope-variance estimates \(0.0008\), \(0.0010\), and \(0.0009\), with log likelihoods \(-526.731\), \(-526.730\), and \(-526.731\), respectively. Their scaled gradients are all below \(0.001\), with no convergence warnings, and the fixed-effect estimates agree to the displayed precision.

The central estimate gives a random-slope standard deviation of \(\sqrt{0.0009}=0.030\) log-odds units per ten-minute predictor unit. Suppose additional refits give profile log likelihoods \(-526.732\) at zero, \(-526.730\) at \(0.0009\), and \(-526.734\) at \(0.0036\). The fitted value is better than zero by \(0.002\) log-likelihood units, and the likelihood ratio is \(\exp(2\times0.002)=\exp(0.004)\approx1.004\). The likelihood is nearly flat across these small values, while separate optimizations agree closely.

This is consistent with a stable fit whose random-slope variance is very small or effectively at the boundary for these data. The small estimate should not be described as proof of no slope variation. Its interpretation is limited by the predictor’s units and by the weak likelihood distinction among nearby values.

Worked Example: A Near-Zero Estimate with Conflicting Diagnostics

Suppose a hypothetical binary-outcome analysis fits a random-slope GLMM to data from 14 clinics. Assume the same model and integration settings are used for all runs. Optimizer A reports a slope variance of \(0.0002\) and log likelihood \(-438.205\); optimizer B reports \(0.018\) and \(-438.192\); optimizer C reports zero and \(-438.207\). A and C have scaled gradients \(0.08\) and \(0.12\), respectively. B has a scaled gradient of \(0.0007\), but its curvature check indicates an ill-conditioned direction and its fixed-effect estimates change noticeably after a restart.

Optimizer B has the largest reported log likelihood, but its advantage over A is only \(-438.192-(-438.205)=0.013\); over C it is \(0.015\). The corresponding likelihood ratios are \(\exp(2\times0.013)\approx1.026\) and \(\exp(2\times0.015)\approx1.030\). These small differences do not resolve the conflict, especially because none of the runs provides a fully reassuring combination of diagnostics and reproducibility.

The appropriate conclusion is that the near-zero estimate is not yet a trustworthy boundary diagnosis. A small gradient from one run does not overcome the curvature and restart concerns, and the other runs have larger gradients. Check the optimization setup and implementation, and investigate whether the model is identifiable and numerically stable before interpreting the random-slope variance. Do not select the run with the largest likelihood and treat that alone as proof of a reliable fit.

Alternatives, Failure Modes, and Limits

The main alternative to retaining the random effect is fitting the corresponding model without it. At variance zero, that reduced model is the boundary case of the random-effects model. Comparing fits can clarify whether the extra component improves the likelihood, but a likelihood comparison does not replace convergence checks, and formal inference at the boundary needs an appropriate reference distribution. Bayesian analysis provides a different framework for variance components and depends on its prior specification; it is not a numerical repair for an unstable frequentist fit.

Several failure modes deserve particular attention:

  • Equating a tiny estimate with a failed fit. Zero is an allowed boundary value. A near-zero estimate can be a legitimate result when likelihood and numerical checks are coherent.
  • Equating convergence with a meaningful variance. A successful optimizer message does not establish that the variance is well determined or substantively important.
  • Ignoring scale. The same numerical variance can represent different amounts of variation depending on the random effect’s units. Report the standard deviation and units where useful.
  • Comparing incompatible likelihoods. Different integration accuracy, likelihood definitions, or data handling can create differences that are not attributable to the variance value itself.
  • Overinterpreting rounded output. A printed zero may conceal a small positive estimate, while a small printed positive value may be sensitive to precision.

Likelihood comparisons are only as informative as the fitted likelihood evaluations. Near-boundary curvature can be weak, and numerical approximations can matter. Moreover, a plausible boundary estimate is a statement about the fitted model and observed data, not evidence that grouping is irrelevant in every population or that the model’s other assumptions are correct. The broader assessment of covariance-matrix singularity and design-based identifiability requires separate checks.

Key takeaway: Interpret a near-zero variance by combining its standard-deviation scale, likelihood behavior at zero and nearby values, and reproducible optimization diagnostics. A small estimate alone is neither proof of a true zero variance nor proof of numerical failure.

Check Your Understanding

Answer each question, then compare with the brief solutions.

  1. A random-intercept variance is estimated as \(0.0025\). What is the corresponding standard deviation, and what additional information is needed to interpret its size?
  2. A profile log likelihood is \(-120.000\) at zero and \(-119.998\) at the fitted variance. Calculate the likelihood ratio comparing the fitted value with zero. Does this alone establish that the variance is nonzero?
  3. Why should likelihood values at zero and at a small positive variance be computed using the same numerical settings?
  4. One optimizer returns a variance near zero with a large scaled gradient; another returns a larger variance with a small gradient but an ill-conditioned curvature check. What is the appropriate conclusion?
  5. In a logistic random-intercept model, why is a variance of zero a permitted boundary value rather than an invalid parameter value?

Solutions. (1) \(\sqrt{0.0025}=0.050\) random-effect units. Interpret it using the units and substantive scale of that random effect, alongside likelihood and fit diagnostics. (2) \(\exp\{2[-119.998-(-120.000)]\}=\exp(0.004)\approx1.004\). This is a very small likelihood difference and does not alone establish a nonzero variance. (3) Otherwise changes in likelihood approximation or optimization settings could be mistaken for changes caused by the variance value. (4) The runs give conflicting, incomplete evidence; investigate reproducibility and numerical stability rather than declaring either estimate reliable. (5) The variance is constrained to be nonnegative, and zero represents a degenerate random-effect distribution with no between-group variation for that effect.

Clinical Biostats