Why a Near-Zero Variance Changes Predictions
A group’s empirical Bayes prediction combines its observed data with the fitted distribution of group effects. When the fitted random-effect variance is small, that distribution assigns little spread to group effects. The resulting predictions are pulled toward zero: the model estimates that groups differ little from the population-level reference, even if a particular group’s observed outcome differs from that reference.
This is a consequence of the fitted model, not by itself evidence of an optimizer failure. A variance estimate at or near zero can be a valid boundary estimate; it can also occur in a fit whose numerical behavior deserves investigation. The prediction consequence and the convergence question must be assessed separately.
Here, “toward zero” refers to the random effect on the model’s linear-predictor scale. It does not mean that the predicted outcome is zero, nor that the group’s observed outcome is replaced by zero. In a logistic model, for example, \(b_j=0\) means that the group has no estimated random-intercept departure from the fixed-effects linear predictor; the predicted probability can still be far from zero.
The Gaussian Case: An Exact Shrinkage Calculation
Start with a Gaussian random-intercept model, conditional on fitted parameters:
Assume the group effects are independent across groups, the errors are independent across observations and groups, and the errors are independent of the group effects. Suppose \(\beta_0\), \(\tau^2\), and \(\sigma^2\) are treated as known for this calculation. The group mean \(\bar y_j\), based on \(n_j\) observations, has conditional variance \(\sigma^2/n_j\) around \(\beta_0+b_j\). The empirical Bayes prediction is the conditional mean of \(b_j\) given the group data. Under this Gaussian model, it is also the conditional mode.
The shrinkage formula follows by combining the normal likelihood for \(\bar y_j-\beta_0\) with the normal distribution for \(b_j\). Up to a constant independent of \(b_j\), the log of their product is:
This is a quadratic function of \(b_j\). Differentiating with respect to \(b_j\) and setting the derivative to zero gives:
In an empirical Bayes calculation, the fitted parameters are plugged into this expression. The weight \(w_j=\hat{\tau}^2/(\hat{\tau}^2+\hat{\sigma}^2/n_j)\) lies between zero and one when the variances are positive. If \(\hat{\tau}^2\) decreases toward zero while \(\hat{\sigma}^2/n_j\) remains positive, then \(w_j\) decreases toward zero and the prediction approaches zero. The group’s raw departure \(\bar y_j-\hat{\beta}_0\) is multiplied by a smaller weight.
Worked Example: Gaussian Predictions as the Fitted Variance Shrinks
Suppose a hypothetical Gaussian random-intercept analysis has a fitted population intercept of \(\hat{\beta}_0=10\) units, residual variance \(\hat{\sigma}^2=4\) square units, and \(n_j=5\) observations in a group with mean \(\bar y_j=12.4\) units. The group’s raw departure is \(12.4-10=2.4\) units, and the sampling variance of its mean around \(\beta_0+b_j\) is \(4/5=0.8\) square units.
First suppose the fitted random-intercept variance is \(\hat{\tau}^2=0.20\) square units. Then:
The prediction is \(0.48\) units above zero, not the full observed departure of \(2.4\) units. Now reduce the fitted variance to \(0.01\) square units, holding the other quantities fixed:
The smaller variance yields a prediction much closer to zero. It does not change the observed group mean, which remains \(12.4\) units; it changes how much of that mean’s departure the fitted model attributes to a group effect.
What the Limiting Argument Means in a GLMM
For a non-Gaussian GLMM, a group’s likelihood contribution need not be quadratic in \(b_j\), so the Gaussian shrinkage formula is not generally exact. But the same limiting behavior has a direct justification for the conditional mode. With fitted fixed effects held fixed, the conditional mode maximizes the group log-likelihood plus the log density of its random effect. Ignoring constants, the objective is:
where \(\ell_j(b_j)\) is the group’s log-likelihood contribution as a function of its random intercept. The second term penalizes departures from zero. As \(\hat{\tau}^2\) becomes small, that penalty becomes increasingly strong for any fixed nonzero \(b_j\). If the group likelihood is smooth and its score at zero is finite, the conditional mode is therefore driven toward zero.
A local quadratic approximation makes the mechanism more explicit. If the group log-likelihood near its maximum is approximated by a quadratic with an unpenalized estimate \(z_j\) and variance \(v_j\), the approximate conditional mode is:
This is an approximation, not a universal exact formula for a binary or count GLMM. It is useful for understanding the direction of shrinkage: when \(\hat{\tau}^2\) is small relative to the group likelihood’s local uncertainty \(v_j\), the prediction is small relative to \(z_j\). Conditional modes and conditional means can differ in non-Gaussian models; the limiting effect of a variance collapsing to zero is the point here, not an assumption that every GLMM prediction follows the Gaussian formula exactly.
Worked Example: A Binary Random-Intercept Mode Near Zero
Consider a hypothetical binary random-intercept model for one group. Suppose there are \(20\) observations, \(14\) successes, the fixed-effects linear predictor at \(b_j=0\) is zero, and the fitted random-intercept variance is \(\hat{\tau}^2=0.04\). Assume the fitted fixed effects are held fixed. With a logistic link, the group log-likelihood, apart from a constant, is \(14b_j-20\log(1+\exp(b_j))\). The conditional mode maximizes:
Differentiating and setting the score equal to zero gives the equation:
At \(b_j=0\), this score is \(14-20(0.5)-0=4\), so the mode is above zero. Substituting \(b_j=0.1334\), the fitted success probability is approximately \(\exp(0.1334)/(1+\exp(0.1334))=0.5333\). The score is then approximately:
Thus the conditional mode is approximately \(0.1334\) on the log-odds scale. It is positive, but modest: the model does not attribute the entire excess of \(14\) successes over the \(10\) expected at probability \(0.5\) to a group effect. The fitted variance imposes a substantial penalty on that effect. This numerical mode is obtained from the nonlinear score equation, not by treating the Gaussian shrinkage formula as exact.
A Boundary Estimate Is Not a Convergence Diagnosis
Random-effect variances are constrained to be nonnegative. Consequently, a likelihood-based fit can attain its maximum at the boundary \(\hat{\tau}^2=0\). If the fitted model has exactly this value for a random intercept, its implied random intercepts are all zero, and the associated empirical Bayes predictions are zero. This says what the fitted model implies at the boundary; it does not, on its own, say whether the fitting algorithm successfully found the intended optimum.
Convergence concerns the numerical procedure used to optimize the fitting criterion. A near-zero estimate can appear in a fit that has converged successfully, or in a fit with numerical difficulties. Conversely, an optimizer’s “converged” message does not show that the model is correctly specified or that the estimate is well determined. Evaluate the estimate and the numerical diagnostics as distinct questions.
Worked Example: Checking a Zero Estimate Separately From Convergence
Suppose a hypothetical fit reports \(\hat{\tau}^2=0\) for a random intercept. For each group, the fitted random-intercept prediction is \(0\), because the fitted random-effects distribution has collapsed to a point at zero. The fixed-effects part of the model still supplies predictions; only the group-specific random-intercept departure is zero.
To assess numerical convergence, suppose the output also shows that the optimizer terminated normally, the gradient is small, and refitting from different reasonable starting values gives the same fitted criterion and variance estimate. These checks support the claim that the optimizer reached a stable boundary solution. They do not prove that the boundary estimate is scientifically appropriate or precisely determined.
Now suppose instead the output reports a large gradient or gives materially different answers from different starting values. The same printed variance estimate of zero would then not be enough to claim a stable fit. The near-zero prediction remains the plug-in consequence of that reported estimate, but the fitting result needs investigation before it is relied on.
Diagnostics, Alternatives, and Limitations
When a fitted variance is near zero, inspect the fitting information rather than using the size of the group predictions as a convergence test. Useful checks include whether the optimizer reports successful termination, whether the gradient at the reported solution is small, whether the fitted criterion and parameters are stable across reasonable starting values, and whether the optimization behaves sensibly near the nonnegative boundary. A likelihood profile for the variance can also help show whether the criterion favors a boundary value or is nearly flat over a range of small values. Such a profile concerns uncertainty about the variance estimate; it is not a numerical convergence certificate by itself.
Several different summaries answer different questions:
- Raw group departures describe observed differences from a reference, but do not account for the fitted random-effects distribution and the group’s data precision.
- Empirical Bayes predictions use both the group data and the fitted variance. They are the appropriate plug-in predictions of latent group effects under the fitted model, but can be close to zero when that variance is small.
- A model with no random intercept sets the group-effect variance to zero rather than estimating positive group-to-group variation. Comparing this with a model that estimates the variance changes the model being fitted; it does not resolve optimizer diagnostics or variance uncertainty automatically.
The plug-in nature of an empirical Bayes prediction matters particularly near the boundary. It uses \(\hat{\tau}^2\) as if that fitted value were fixed. If the variance is weakly determined, predictions calculated at that single value can understate how much the predictions would change across plausible variance values. A small fitted prediction should therefore not be treated as proof that the true group effect is exactly zero.
There are also limits to what a near-zero variance says. It concerns variation represented by this particular random effect under the chosen model and data; it does not establish that groups are identical in every respect. The fixed-effects structure, outcome distribution, link, and sampling design still matter. Nor does the shrinkage result justify replacing a convergence check with a visual inspection of predictions. Prediction behavior describes the consequence of the fitted parameters; convergence diagnostics assess whether the fitting computation found a stable solution.
Check Your Understanding
Answer each question, then compare your reasoning with the solutions.
- In the Gaussian model, suppose \(\hat{\tau}^2=0.05\) square units and \(\hat{\sigma}^2/n_j=0.45\) square units. What is the shrinkage weight?
- A group’s observed binary success rate is above the reference rate, but the fitted random-intercept variance is zero. What is its fitted random-intercept prediction, and does this imply its predicted probability is zero?
- Does an optimizer’s convergence message prove that a near-zero variance estimate is well determined? Give one additional diagnostic that could be useful.
- Why is the Gaussian shrinkage formula not generally an exact formula for a binary GLMM conditional mode?
Solutions. (1) The weight is \(0.05/(0.05+0.45)=0.05/0.50=0.10\), so the predicted random effect is one tenth of the raw group departure. (2) The fitted random-intercept prediction is zero because the fitted variance is zero. The predicted probability is determined by the fixed-effects linear predictor and link, so it need not be zero. (3) No. Convergence is a numerical claim, not proof of precise variance estimation; a variance profile or stability checks across starting values can provide additional information. (4) A binary group log-likelihood is generally not quadratic in the random intercept. The Gaussian expression relies on an exact quadratic likelihood and normal distribution, whereas the binary conditional mode must be obtained from its own penalized likelihood.