Tutorials › Generalized Linear Mixed Models (GLMM) › Worked Example of Quasi-Complete Separation

Separation in Binary Outcomes · Tutorial 349 of 698

Worked Example of Quasi-Complete Separation

Learn to identify quasi-complete separation in a binary mixed model and use likelihood behavior to recognize why a finite fixed-effect estimate may not exist.

Advanced 12 min read

What You'll Learn

  • Define quasi-complete separation using the fixed-effects design and observed binary outcomes.
  • Check the separation condition in a clustered logistic random-intercept dataset.
  • Distinguish a likelihood slice from a marginal likelihood profile in a GLMM.
  • Derive why increasing a separated coefficient can keep increasing the marginal likelihood.
  • Interpret large fitted coefficients and odds ratios cautiously when the likelihood has a finite limit.
  • Identify diagnostics and distinguish separation from ordinary convergence failure.

Why a Finite Estimate Can Be Missing

In a binary mixed model, a fixed-effect coefficient describes a conditional log-odds relationship: it is interpreted with the random effects held fixed. When a predictor separates some outcomes, the likelihood can keep improving as its coefficient grows, even though the improvement becomes very small. An optimizer may then stop at a large finite number, but that number need not be a finite maximum-likelihood estimate.

The distinction between complete and quasi-complete separation depends on whether the separating direction gives strict inequalities for every observation or allows equality for some. Here the equality observations are important: they leave information about other parts of the model while a particular coefficient can still move without bound. The worked calculations below use a random-intercept logistic model and make that pattern explicit.

Model and Separation Condition

Definition: Let \(Y_{ij}\in\{0,1\}\) be the outcome for observation \(i\) in cluster \(j\), and let \(\mathbf{x}_{ij}\) be its fixed-effects design vector. A quasi-completely separating direction is a nonzero vector \(\mathbf{d}\) such that \(\mathbf{x}_{ij}^{\mathsf T}\mathbf{d}\geq 0\) for every observation with \(Y_{ij}=1\), and \(\mathbf{x}_{ij}^{\mathsf T}\mathbf{d}\leq 0\) for every observation with \(Y_{ij}=0\), with strict inequality for at least one observation and equality for at least one observation. The inequalities may be reversed by replacing \(\mathbf{d}\) with \(-\mathbf{d}\).

For the example, suppose the conditional model is

$$ Y_{ij}\mid b_j \sim \operatorname{Bernoulli}(p_{ij}),\qquad \operatorname{logit}(p_{ij})=\beta_0+\beta_1x_{ij}+b_j,\qquad b_j\sim N(0,\tau^2). $$

The random intercepts \(b_j\) are independent across clusters. Conditional on the random effects, observations are independent Bernoulli variables; the random effects follow the stated normal distribution and are independent of the fixed design. The marginal likelihood integrates the conditional likelihood over that distribution. These are modeling assumptions, not consequences of the separation pattern.

For the covariate \(x\in\{0,1\}\), the direction that increases \(\beta_1\) is \(\mathbf{d}=(0,1)^{\mathsf T}\), corresponding to intercept and slope. At \(x=0\), \(\mathbf{x}^{\mathsf T}\mathbf{d}=0\) for both outcomes. At \(x=1\), it is positive. If all \(x=1\) outcomes are successes, the direction satisfies the separation inequalities; the \(x=0\) observations are equality observations. If some \(x=0\) observations are failures, the inequalities are strict for the \(x=1\) successes and equality holds for both outcomes at \(x=0\). This is quasi-complete separation.

Worked Example: Checking a Clustered Dataset

Consider four hypothetical clusters. In each cluster, two observations have \(x=0\), one with outcome 1 and one with outcome 0. A third observation has \(x=1\) and outcome 1. Thus there are eight \(x=0\) observations (four successes and four failures) and four \(x=1\) observations (all successes).

Check the direction. For \(\mathbf{d}=(0,1)^{\mathsf T}\), the directional predictor value is \(0\) for each \(x=0\) observation and \(1\) for each \(x=1\) observation. The four \(x=1\) successes satisfy the required strict positive inequality. The four \(x=0\) failures and four \(x=0\) successes satisfy equality. Therefore this is quasi-complete, not complete, separation in the fixed-effects design.

Check what the pattern does not say. At \(x=0\), both outcomes occur, so the intercept-only part of the design is not perfectly predictive there. Nevertheless, the slope direction can keep raising the fitted success probability for the \(x=1\) observations without changing their classification. This dataset is hypothetical and is used to illustrate the likelihood behavior, not to represent a study.

Why the Likelihood Keeps Increasing

Hold \(\beta_0\) and \(\tau\) fixed and increase \(\beta_1\). Conditional on any finite value of \(b_j\), the success probability for an \(x=1\) observation is

$$ p_{ij}=\operatorname{logit}^{-1}(\beta_0+\beta_1+b_j), \qquad \frac{\partial p_{ij}}{\partial \beta_1}=p_{ij}(1-p_{ij})>0. $$

Its likelihood contribution, because its outcome is 1, is \(p_{ij}\), so that contribution strictly increases with \(\beta_1\). Every \(x=0\) contribution is unchanged when \(\beta_1\) changes. Consequently, the conditional likelihood increases pointwise for every random-effects realization. Integrating over the random effects preserves the increase: an integral of a pointwise larger nonnegative likelihood is larger. This gives a direct justification for the marginal-likelihood behavior; it does not require treating estimated random effects as known.

As \(\beta_1\) tends to infinity, each \(x=1\) success contribution tends to 1 for every finite \(b_j\). The marginal likelihood therefore approaches a finite limit. For any finite \(\beta_1\), those success probabilities are still less than 1, so increasing the slope raises the likelihood. There is no finite maximizer along this direction. The profile likelihood, defined by maximizing the marginal log-likelihood over nuisance parameters such as \(\beta_0\) and \(\tau\) at each fixed \(\beta_1\), cannot have a finite global maximum either: at any finite parameter setting, increasing \(\beta_1\) while holding the nuisance parameters fixed gives a higher likelihood.

Key result: In this dataset, the marginal likelihood has a finite limiting value as \(\beta_1\to\infty\), but no finite maximum in the separating direction. The maximum-likelihood estimate of \(\beta_1\) is therefore not finite. A software-reported finite slope may be an optimizer’s stopping value, rather than an attained maximum.

Worked Likelihood Calculations

A simple likelihood slice makes the approach to the limit visible. Fix \(\beta_0=0\) and set \(b_j=0\) for all clusters. This is a conditional likelihood slice, not the GLMM marginal profile: it is a calculation at specified nuisance values and specified random effects. For the eight \(x=0\) observations, each success-failure pair contributes \(0.5(1-0.5)=0.25\). For the four \(x=1\) successes, each contributes \(p_1=\operatorname{logit}^{-1}(\beta_1)\). Thus

$$ L_c(\beta_1)=\{0.25\}^{4}\{p_1\}^{4}, \qquad \ell_c(\beta_1)=4\log(0.25)+4\log(p_1). $$

Worked Example: Comparing Likelihood Values Along the Slope Direction

Use the conditional slice above. At \(\beta_1=2\), \(p_1=\operatorname{logit}^{-1}(2)\approx0.8808\). Substitution gives

$$ L_c(2)=\{0.25(0.8808)\}^{4} =(0.2202)^4\approx0.002351, \qquad \ell_c(2)=4\log(0.25)+4\log(0.8808)\approx-6.053. $$

At \(\beta_1=4\), \(p_1=\operatorname{logit}^{-1}(4)\approx0.9820\), so

$$ L_c(4)=\{0.25(0.9820)\}^{4} =(0.2455)^4\approx0.003633, \qquad \ell_c(4)=4\log(0.25)+4\log(0.9820)\approx-5.618. $$

The likelihood is larger at 4 than at 2. As \(\beta_1\to\infty\), \(p_1\to1\), and the slice approaches \((0.25)^4=0.00390625\), with log-likelihood \(4\log(0.25)\approx-5.545\). These are values for the stated conditional slice only; they are not marginal likelihood values or fitted GLMM estimates.

Worked Example: Interpreting Large Slope Values

In the conditional model, a one-unit increase in \(x\) multiplies the odds by \(\exp(\beta_1)\), holding the random intercept fixed. At \(\beta_1=4\), the conditional odds ratio is \(\exp(4)\approx54.60\). At \(\beta_1=6\), it is \(\exp(6)\approx403.4\). The corresponding success probabilities at \(b_j=0,\beta_0=0\) are approximately \(0.9820\) and \(0.9975\), respectively.

These calculations do not establish that either value is an estimate. In this example, each larger slope gives a larger likelihood, and there is no finite maximum. An optimizer might stop near 4, 6, or another large value depending on its stopping rules, scaling, and numerical tolerances. Reporting its finite output as a stable maximum-likelihood estimate would confuse an algorithmic stopping point with the likelihood’s actual behavior.

Reading Diagnostics and Avoiding Misdiagnosis

Evidence for quasi-complete separation comes from the pattern of outcomes and the direction of the likelihood, considered together. Useful checks include:

  • Inspect the design and outcome combinations. Here every observation at \(x=1\) is a success, while both outcomes occur at \(x=0\). This verifies the boundary pattern and the equality observations.
  • Examine the coefficient path. If estimates grow as iterations continue or as a fitting tolerance is tightened, and fitted probabilities for the boundary successes approach 1, the coefficient may be moving along a separating direction.
  • Inspect a likelihood profile. A profile that continues to rise and then becomes nearly flat at large positive slopes is consistent with an unattained finite limit. A broad plateau can make the endpoint hard to locate numerically.
  • Check uncertainty output cautiously. A large standard error, unstable Wald interval, or sensitivity to initialization can accompany separation. Such output alone does not prove separation; it must be checked against the data pattern and likelihood behavior.

Separation is not the same as ordinary convergence failure. A model can fail to converge for many reasons, including a difficult random-effects likelihood or poor numerical scaling. Conversely, an optimizer can report convergence at a large finite slope even though the likelihood has no finite maximum. The decisive evidence is not a warning by itself but a compatible outcome pattern and a likelihood that improves along the separating direction.

A common mistake is to interpret a large finite coefficient as a very precisely estimated, exceptionally strong association. The correction is to ask whether the likelihood actually peaks at that value. Under quasi-complete separation, the coefficient is not a finite maximum-likelihood estimate; the large value reflects the boundary pattern, and an ordinary Wald calculation based on it may not have its usual justification.

The main alternatives answer different questions. A finite likelihood maximum with a flat, weakly identified direction is not automatically separation; the profile’s shape and the design pattern help distinguish them. The earlier material on Firth correction, proper priors, and ridge penalization describes ways to regularize separated estimates. Those approaches can produce finite estimates under their respective specifications, but they do not change the fact that the unregularized likelihood in this example has no finite maximum. Remedies that change the observed design should likewise be evaluated on substantive grounds, not used merely to conceal the boundary pattern.

The example uses a single fixed slope and a random intercept. It does not show that every large GLMM coefficient indicates quasi-complete separation, nor does it diagnose separation involving other parts of a model. Sparse data, model misspecification, unusual random-effects behavior, and numerical problems can also produce unstable fits. The separation condition must be checked for the fixed-effects design and the observed outcomes in the model actually being fitted.

Check Your Understanding

Answer each question using the hypothetical four-cluster dataset above.

  1. Why is the pattern quasi-complete rather than complete separation?
  2. What happens to the four \(x=1\) success contributions as \(\beta_1\to\infty\), holding the other parameters fixed?
  3. For the conditional likelihood slice, calculate the limiting likelihood and its log.
  4. Does a software estimate of \(\beta_1=6\) establish that the unregularized maximum-likelihood estimate is 6?
  5. Name two kinds of evidence, beyond a software warning, that support a separation diagnosis.

Solutions. (1) The \(x=1\) successes satisfy strict inequalities in the slope direction, but the \(x=0\) successes and failures have directional value zero; equality observations remain, so separation is quasi-complete. (2) Each success contribution \(p_{ij}\) increases toward 1 for every finite random intercept, and the marginal likelihood approaches a finite limit after integration. (3) The slice limit is \((0.25)^4=0.00390625\); its log is \(4\log(0.25)\approx-5.545\). (4) No. The likelihood keeps increasing along the separating direction, so 6 can be an optimizer’s stopping value rather than a finite maximum. (5) Examples include the boundary outcome pattern in the design and a likelihood profile that rises toward a plateau as the slope increases; a growing coefficient path with probabilities approaching 1 is another compatible diagnostic.

Clinical Biostats