Tutorials › Generalized Linear Mixed Models (GLMM) › Deriving the Half-at-Zero, Half-Chi-Square Reference Law

Testing Fixed and Random Effects · Tutorial 376 of 698

Deriving the Half-at-Zero, Half-Chi-Square Reference Law

You will derive the boundary likelihood-ratio reference distribution and learn when its mixture-based p-values and cutoffs are appropriate.

Advanced 10 min read

What You'll Learn

  • State the null and alternative for testing one nonnegative variance component.
  • Identify the regularity conditions needed for the boundary reference law.
  • Derive the likelihood-ratio statistic as the squared positive part of a standard normal variable.
  • Calculate mixture-based p-values and a 5% critical value.
  • Recognize when an ordinary chi-square calibration or the mixture approximation may be unreliable.

Why a Boundary Test Has a Different Reference Law

A variance component cannot be negative. Consequently, when a GLMM is tested for whether a single random-effect variance is zero, the null value lies at the edge of the allowed parameter space. This changes the large-sample behavior of the likelihood-ratio statistic: it does not, under standard conditions, have the ordinary chi-square distribution used for a regular one-parameter test.

The relevant asymptotic distribution has probability one-half at zero and probability one-half distributed as a chi-square random variable with one degree of freedom. The point mass matters for both p-values and critical values. This tutorial derives that result for one variance component; it is not a general reference law for every test involving random effects.

Definition: Let \(\tau\geq 0\) be the variance of one random effect, and let \(\eta\) denote all other model parameters. The likelihood-ratio statistic for testing \(H_0:\tau=0\) against \(H_a:\tau>0\) is $$ T=2\left\{\max_{\tau\geq 0,\,\eta}\ell(\tau,\eta)-\max_{\eta}\ell(0,\eta)\right\}, $$ where \(\ell\) is the log likelihood. Under the conditions described below, when \(H_0\) is true, \(T\) converges in distribution to \(\tfrac12\delta_0+\tfrac12\chi^2_1\). Here \(\delta_0\) denotes a point mass at zero.

The two likelihood maxima use the same nuisance parameters, but the alternative permits \(\tau\) to be positive. In practice, the log likelihood is generally the marginal likelihood for the observed responses, with random effects integrated out. The test statistic is nonnegative because the alternative includes the null model.

Conditions for the Mixture Approximation

This reference law is an asymptotic result, not a finite-sample identity. Its standard conditions include the following:

  • The null hypothesis is that exactly one variance parameter, \(\tau\), equals zero, and the alternative allows that parameter to increase only in the nonnegative direction.
  • The other parameters are identifiable under the null and are at interior values. Their estimation can be handled by regular likelihood theory after accounting for nuisance parameters.
  • The log likelihood is sufficiently smooth near the null, and the variance direction has positive, finite efficient information. In particular, the model must contain information that distinguishes small positive values of \(\tau\) from zero.
  • The data provide increasing information as the sample grows, with an appropriate independent sampling structure. For clustered data, a large number of independent clusters is often important; merely increasing observations within a fixed number of clusters need not provide the same approximation.
  • No additional parameter is becoming unidentified or constrained at a boundary in a way that changes the local likelihood problem.

These assumptions are substantive. For example, if the design cannot distinguish random-intercept variation from other sources of variation, the required information in the variance direction may be weak or absent. Sparse outcomes, very few clusters, or a complicated random-effects structure can also make the asymptotic approximation inaccurate. The point-mass mixture should therefore be used only when the one-boundary-parameter setup is a reasonable description of the test.

Deriving the Half-at-Zero, Half-Chi-Square Law

The key is that a locally quadratic log likelihood is maximized over a half-line rather than over the whole real line. Profile the nuisance parameters out of the log likelihood, and consider local values of the variance parameter of the form \(\tau=h/\sqrt{n}\), where \(h\geq 0\) and \(n\) represents the growing information scale. Under the regularity conditions, the local profile log-likelihood difference has the expansion

$$ \ell_p(h/\sqrt{n})-\ell_p(0) = h\Delta_n-\frac{1}{2}h^2 I_{\mathrm{eff}}+o_p(1), \qquad h\geq 0, $$

where \(I_{\mathrm{eff}}>0\) is the efficient information for the variance direction after accounting for nuisance parameters, and \(\Delta_n\) converges in distribution to a normal random variable with mean zero and variance \(I_{\mathrm{eff}}\). Equivalently, \(Z_n=\Delta_n/\sqrt{I_{\mathrm{eff}}}\) converges to \(N(0,1)\). Setting \(q=h\sqrt{I_{\mathrm{eff}}}\) rewrites the quadratic part as \(qZ_n-q^2/2\), with \(q\geq 0\).

1
Maximize on the permitted side.
For fixed \(Z_n\), the unconstrained maximum of \(qZ_n-q^2/2\) occurs at \(q=Z_n\). Restricting to \(q\geq0\) gives \(\hat q=\max(Z_n,0)\).
2
Form twice the log-likelihood gain.
The maximum gain is \(\hat qZ_n-\hat q^2/2\). If \(Z_n>0\), this equals \(Z_n^2/2\); if \(Z_n\leq0\), it equals zero. Thus the likelihood-ratio statistic converges to \(\max(Z,0)^2\), where \(Z\sim N(0,1)\).
3
Translate the normal result into a mixture.
With probability one-half, \(Z\leq0\) and the constrained maximum is at the null, giving \(T=0\). With probability one-half, \(Z>0\) and \(T=Z^2\). By symmetry, the distribution of \(Z^2\) conditional on \(Z>0\) is \(\chi^2_1\).

The result follows: half the limiting probability is concentrated at zero, and the positive half has the shape of a one-degree-of-freedom chi-square distribution. In particular, for \(t>0\),

$$ P(T\geq t)\ \longrightarrow\ \frac{1}{2}P(\chi^2_1\geq t) =1-\Phi(\sqrt{t}), $$

where \(\Phi\) is the standard normal cumulative distribution function. At \(t=0\), the inclusive upper-tail probability is one, because the limiting statistic is always nonnegative. This is why a positive observed statistic uses half the usual \(\chi^2_1\) upper tail, while a statistic exactly equal to zero has p-value one under the conventional inclusive-tail definition.

Worked Example: Calculating a Mixture-Based P-Value

Consider hypothetical binary outcomes from 18 independent clinics, with 10 patients observed per clinic and 63 total events. A logistic random-intercept model is fitted, testing whether the clinic-level intercept variance is zero. Suppose the fitted marginal log likelihoods are \(-128.60\) under the null and \(-127.40\) under the alternative. Assume the fixed intercept is identifiable under the null, the variance direction has positive information, and the number of independent clinics is adequate for the asymptotic approximation.

The likelihood-ratio statistic is $$ T=2\{(-127.40)-(-128.60)\}=2(1.20)=2.40. $$ Because \(T>0\), its mixture-based p-value is $$ p=\frac{1}{2}P(\chi^2_1\geq 2.40) =1-\Phi(\sqrt{2.40}) =1-\Phi(1.549) \approx 0.0607. $$

At a 5% significance level, this p-value is larger than 0.05, so the test does not reject \(H_0\). The result is not evidence that the variance is exactly zero; it indicates that this test, at this level, does not provide sufficient evidence against zero.

Critical Values and the Ordinary Chi-Square Comparison

For a positive statistic, the mixture upper tail is one-half the \(\chi^2_1\) upper tail. Therefore, a 5% upper-tail test must use a value \(c\) satisfying

$$ \frac{1}{2}P(\chi^2_1\geq c)=0.05. $$

Equivalently, \(P(\chi^2_1\geq c)=0.10\), so \(c\) is the 90th percentile of \(\chi^2_1\), approximately 2.7055. This is smaller than 3.841, the 95th percentile used for an ordinary \(\chi^2_1\) test. Using 3.841 for this boundary test gives a different and generally conservative calibration under the stated mixture law.

Worked Example: Applying the 5% Mixture Cutoff

Suppose a hypothetical study of 30 independent clinics fits a random-intercept logistic model and reports a likelihood-ratio statistic \(T=2.80\) for one clinic-level variance. Assume the nuisance parameters are regular under the null, the variance is locally identifiable, and the asymptotic conditions are reasonable.

The mixture p-value is $$ p=\frac{1}{2}P(\chi^2_1\geq 2.80) =1-\Phi(\sqrt{2.80}) =1-\Phi(1.673) \approx 0.0471. $$ Since \(0.0471<0.05\), the test rejects \(H_0\) at the 5% level. The same decision follows from comparing \(2.80\) with the mixture critical value \(2.7055\).

For comparison, an ordinary \(\chi^2_1\) calibration would give an upper-tail p-value of approximately \(2(0.0471)=0.0942\) and would not reject at 5%. That calculation does not use the boundary reference law derived here. The choice between the calibrations is not a matter of preference: it depends on whether the test really has the one-variance-component boundary structure and whether its asymptotic assumptions are credible.

What a Zero Statistic Means

The atom at zero has a direct optimization interpretation. If the alternative model's constrained maximum occurs at \(\hat{\tau}=0\), it has the same maximized likelihood as the null model. The likelihood-ratio statistic is then zero. This is not a negative statistic or an indication that the alternative fitted worse; the alternative includes the null and the two fits coincide at the boundary.

Worked Example: The Alternative Fit Lands on the Boundary

Suppose hypothetical binary outcomes from 16 independent clinics are analyzed with a random-intercept logistic model. The fitted null and alternative marginal log likelihoods are both \(-94.732\), and the constrained alternative estimate of the variance is \(\hat{\tau}=0\). Assume the fixed intercept is identifiable, the model is correctly specified for this comparison, and the fitting procedure has adequately checked the boundary solution.

The statistic is $$ T=2\{(-94.732)-(-94.732)\}=0. $$ Under the usual inclusive-tail definition, \(p=P(T_{\mathrm{ref}}\geq0)=1\), since the reference distribution has no probability below zero. Thus this test gives no evidence against the zero-variance null. A numerical estimate extremely close to zero should be checked against the optimizer's tolerance and convergence diagnostics before being treated as an exact boundary fit.

Diagnostics, Alternatives, and Limitations

The mixture law is useful because it gives a simple asymptotic calibration for a single variance component at zero. It does not remove the need to assess the model fit or the quality of the approximation. Before interpreting a p-value, check that the null and alternative differ in only the specified variance parameter, that the same fixed-effect structure and likelihood basis are used in both fits, and that both optimizations converged to appropriate maxima. For GLMMs, inspect convergence warnings, sensitivity to starting values, and whether the estimated variance is at or near zero. Also consider the number of independent clusters and whether sparse outcomes make the large-sample approximation doubtful.

A common mistake is to apply Wilks' theorem mechanically and compare every one-parameter likelihood-ratio statistic with \(\chi^2_1\). That regular result relies on the null parameter being an interior point, so local alternatives can move in either direction. Here negative variances are not permitted: the local maximizer is clipped at zero whenever the score points toward a negative value. The resulting point mass and halved positive tail are precisely what the ordinary calibration misses.

A Wald test is also a poor substitute at this boundary: its usual normal approximation treats the parameter as though it could vary locally in both directions and may behave badly when the estimate is zero or nearly zero. The mixture likelihood-ratio test is the standard asymptotic alternative under the conditions stated above. In small or especially irregular samples, finite-sample calibration methods such as a parametric bootstrap may be considered, but they do not make the mixture law exact. If more than one variance or covariance restriction is being tested, this one-parameter derivation does not supply the appropriate reference distribution.

Key takeaway: For one identifiable variance component tested at zero under standard regularity conditions, the asymptotic likelihood-ratio statistic is \(\max(Z,0)^2\) for \(Z\sim N(0,1)\). It is zero with probability one-half and otherwise follows the positive part of a \(\chi^2_1\) law; for \(t>0\), its upper tail is \(1-\Phi(\sqrt{t})\).

Check Your Understanding

Answer each question using the one-variance-component boundary law. Solutions follow the questions.

  1. For an observed statistic \(T=1.00\), calculate the mixture-based upper-tail p-value.
  2. What is the 5% upper-tail critical value under the half-at-zero, half-\(\chi^2_1\) law, and why is it not 3.841?
  3. For \(T=4.00\), compare the mixture-based p-value with the ordinary \(\chi^2_1\) p-value.
  4. Name one condition whose failure could make the one-component mixture approximation unreliable.

Solutions. (1) Since \(T>0\), \(p=1-\Phi(\sqrt{1.00})=1-\Phi(1)\approx0.1587\). (2) The cutoff solves \(\tfrac12P(\chi^2_1\geq c)=0.05\), so \(c\) is the 90th percentile of \(\chi^2_1\), approximately \(2.7055\); 3.841 is its 95th percentile and belongs to the ordinary \(\chi^2_1\) upper-tail test. (3) The mixture p-value is \(1-\Phi(2)\approx0.0228\). The ordinary \(\chi^2_1\) p-value is twice that, approximately \(0.0455\). (4) Examples include too few independent clusters, weak identifiability of the variance direction, or another parameter also becoming unidentified or constrained at a boundary.

Clinical Biostats