Tutorials › Generalized Linear Mixed Models (GLMM) › Finite-Sample Calibration of Boundary Tests

Testing Fixed and Random Effects · Tutorial 387 of 698

Finite-Sample Calibration of Boundary Tests

Learn to assess finite-sample calibration of asymptotic boundary tests using null simulations, rejection rates, and uncertainty in the simulation evidence.

Advanced 13 min read

What You'll Learn

  • State the conditions behind an asymptotic mixture reference distribution for a boundary likelihood-ratio test.
  • Explain why a small number of independent clusters can make that approximation inaccurate.
  • Calculate an empirical null rejection rate and its Monte Carlo standard error.
  • Compare observed rejection rates and simulated quantiles with nominal mixture-test thresholds.
  • Recognize when apparent miscalibration may instead reflect simulation noise, fitting failures, or model misspecification.

Why Check a Boundary Test in Finite Samples?

A likelihood-ratio test for a random-effect variance is often calibrated using an asymptotic mixture distribution. For one variance component tested at zero under suitable conditions, the reference law is a half-at-zero, half-\(\chi^2_1\) mixture. That result describes a limiting distribution; it does not guarantee that the test has its nominal error rate for every finite data set. The gap can matter when the number of independent clusters is small, even if each cluster contributes many observations.

Here, finite-sample calibration means how closely a test’s actual null rejection probability in the specified finite design matches its nominal significance level. If a test is used at \(\alpha=0.05\), good calibration means it rejects about 5% of repeated data sets generated under the null. A test that rejects substantially more often is anti-conservative; one that rejects substantially less often is conservative.

Definition: For a test procedure \(T\) and null model \(H_0\), its size at a specified design and nuisance-parameter setting is \(P_{H_0}(T\text{ rejects})\). The procedure is calibrated at level \(\alpha\) at that setting when this probability is approximately \(\alpha\). Calibration is a property of repeated samples under the null, not of a single observed data set.

The asymptotic mixture law is motivated by the geometry of a variance parameter constrained to be nonnegative. Its accuracy depends on how well the finite data approximate the limiting conditions behind that law. In a generalized linear mixed model (GLMM), information about between-cluster variation is strongly tied to the number of independent clusters. More observations within the same few clusters do not necessarily supply the same information as more independent clusters.

What the Asymptotic Reference Assumes

Consider a null model with a random-intercept variance \(\tau^2=0\), compared with a model allowing \(\tau^2\geq 0\). Let \(\ell_0\) and \(\ell_1\) be the maximized log likelihoods under the null and alternative models, respectively. The likelihood-ratio statistic is \(T=2(\ell_1-\ell_0)\). For a single variance component, under the standard asymptotic conditions, its null reference law is

$$ T \ \xrightarrow{d}\ \tfrac{1}{2}\chi^2_0+\tfrac{1}{2}\chi^2_1. $$

Here \(\chi^2_0\) denotes a point mass at zero. For a positive threshold \(c\), this mixture has upper-tail probability \(\tfrac{1}{2}P(\chi^2_1\geq c)\). Thus its 5% critical value is approximately 2.706: the corresponding \(\chi^2_1\) upper-tail probability is 0.10. This reference is not an ordinary \(\chi^2_1\) law, nor is it a guarantee of exact finite-sample size.

The approximation relies on a correctly specified likelihood and the relevant asymptotic regularity conditions. The tested variance must be on the boundary as described, the compared models must be nested and fitted consistently, and nuisance parameters must behave regularly enough for the limiting result to apply. The particular mixture may also depend on the geometry of the tested parameters and on nuisance parameters; the half-and-half law should not be substituted automatically for every boundary test.

With few clusters, finite-sample likelihoods can be asymmetric or irregular, estimates may pile up at zero, and nuisance parameters may be weakly informed. The statistic’s null distribution can then differ appreciably from its limiting mixture. There is no universal finite-sample correction based only on the cluster count: the link, outcome distribution, cluster-size pattern, fixed-effects design, and nuisance-parameter values can all matter.

Using Null Simulations to Assess Calibration

A simulation study for calibration generates repeated data sets under a specified null model and design, fits the null and alternative models to each, and applies the same test rule each time. It then estimates the null rejection probability by the fraction of simulated tests that reject. This is evidence about the test under the specified conditions; it does not establish calibration for every GLMM or every nuisance-parameter setting.

If \(R\) of \(M\) independent simulated null data sets reject, the estimated rejection rate is \(\hat{q}=R/M\). Because \(R\) is binomial with rejection probability \(q\), the Monte Carlo standard error of \(\hat{q}\) is estimated by

$$ SE(\hat{q})=\sqrt{\frac{\hat{q}(1-\hat{q})}{M}}. $$

This standard error measures simulation noise, not uncertainty in the model parameters and not the sampling standard error of an estimate from the original study. An approximate 95% interval for the simulation rejection rate is \(\hat{q}\pm1.96SE(\hat{q})\), though an exact or binomial-based interval can be preferable when \(M\) is small or the rate is near zero or one.

Worked Example: A Rejection Rate Above the Nominal Level

Suppose a hypothetical study simulates \(M=1{,}000\) independent data sets under a null model for one random-intercept variance. Each test uses the half-at-zero, half-\(\chi^2_1\) reference at \(\alpha=0.05\), with critical value \(c=2.706\). The test rejects when \(T\geq 2.706\). Assume all simulated data sets follow the stated null model and the fitting procedure succeeds for each one.

Suppose \(R=91\) tests reject. The estimated null rejection rate is

$$ \hat{q}=\frac{91}{1{,}000}=0.091=9.1\%. $$

Its estimated Monte Carlo standard error is

$$ SE(\hat{q})= \sqrt{\frac{0.091(1-0.091)}{1{,}000}} =\sqrt{0.000082719} \approx 0.00910, $$

or about 0.91 percentage points. A rough 95% interval is \(0.091\pm1.96(0.00910)\), which is approximately 0.0732 to 0.1088. The nominal rate, 0.05, lies well below this interval. The simulation therefore gives evidence that this test is anti-conservative for the simulated setting. It does not prove that all tests using the mixture law are anti-conservative.

Check More Than One Threshold

A single estimated rejection rate is informative at its chosen \(\alpha\), but assessing calibration across several nominal levels can show whether the discrepancy is confined to one part of the tail. For each chosen \(\alpha\), apply the corresponding mixture critical value to every simulated statistic and estimate the rejection rate. The observed rates should be interpreted alongside their Monte Carlo uncertainty.

Worked Example: Calibration Across Nominal Levels

In a second hypothetical simulation, \(M=2{,}000\) independent null data sets are generated and fitted. For the half-at-zero, half-\(\chi^2_1\) reference, the positive critical value for nominal level \(\alpha\) is the \((1-2\alpha)\) quantile of \(\chi^2_1\). Suppose the simulation gives 58 rejections at \(\alpha=0.01\), 184 at \(\alpha=0.05\), and 285 at \(\alpha=0.10\).

The estimated rejection rates are \(58/2{,}000=0.0290\), \(184/2{,}000=0.0920\), and \(285/2{,}000=0.1425\), respectively. At the 5% level, the estimated Monte Carlo standard error is

$$ \sqrt{\frac{0.0920(1-0.0920)}{2{,}000}} =\sqrt{0.000041768} \approx 0.00646. $$

The estimate is 0.0420 above the nominal 0.05, or about \(0.0420/0.00646=6.50\) Monte Carlo standard errors. The difference is large relative to simulation noise in this example. The rates are also above nominal at 1% and 10%, suggesting a broader upper-tail calibration problem in this setting rather than an isolated discrepancy at 5%. These results are hypothetical and should not be generalized beyond the simulated design and null parameter values.

A useful graphical check plots empirical rejection rates against nominal levels and includes the diagonal line where the two are equal. A curve consistently above the diagonal suggests anti-conservative behavior at those levels; a curve below suggests conservatism. Monte Carlo intervals or error bars matter: small departures from the diagonal may be simulation noise, especially when the number of replicates is limited.

Why Cluster Count and Design Matter

Under the null of zero random-intercept variance, the data may look like independent observations conditional on the fixed effects. Yet the alternative model estimates a between-cluster variance using the pattern of outcomes across clusters. With only a few clusters, that pattern is based on few independent units. The likelihood can consequently have finite-sample behavior unlike the limiting shape that leads to the mixture law.

Worked Example: Comparing Two Cluster Counts

Consider a hypothetical binary GLMM with a random intercept, 10 observations per cluster, and null fixed intercept \(\beta_0=-1\). Under \(H_0\), the random-intercept variance is zero. The same likelihood-ratio test and half-mixture critical value for \(\alpha=0.05\) are used in two designs. In each design, 4,000 independent data sets are simulated under its stated null model, and all fits converge.

With 12 clusters per data set, suppose 352 of 4,000 tests reject. Then \(\hat{q}=352/4{,}000=0.0880\), or 8.80%, and

$$ SE(\hat{q})= \sqrt{\frac{0.0880(0.9120)}{4{,}000}} \approx 0.00448. $$

With 60 clusters per data set, suppose 210 tests reject. Then \(\hat{q}=210/4{,}000=0.0525\), or 5.25%, and

$$ SE(\hat{q})= \sqrt{\frac{0.0525(0.9475)}{4{,}000}} \approx 0.00353. $$

For the 12-cluster design, a rough 95% Monte Carlo interval is \(0.0880\pm1.96(0.00448)\), or about 7.92% to 9.68%. For the 60-cluster design it is \(0.0525\pm1.96(0.00353)\), or about 4.56% to 5.94%. In this hypothetical comparison, the first design shows substantial anti-conservatism, while the second rate is close to the nominal 5% relative to its simulation uncertainty. This illustrates why cluster count is important, but it does not establish a universal threshold at which the mixture approximation becomes reliable.

Diagnostics, Alternatives, and Limitations

Before attributing a discrepancy to the asymptotic reference law, check that the simulation and fitting process implement the intended test. Verify that the null data-generating model, fixed design, cluster sizes, and nuisance-parameter values are recorded; that the null and alternative models differ only as intended; and that the statistic is calculated as \(2(\ell_1-\ell_0)\). Review convergence warnings, boundary estimates, and whether the same likelihood convention is used for both fits. Failed fits or inconsistent model comparisons can distort rejection rates independently of the reference distribution.

Compare the distribution of simulated statistics with the mixture reference, not only the average statistic. In particular, examine how often the fitted variance is zero, how often \(T=0\) or is very small, and how often statistics exceed the mixture critical values. A markedly different mass near zero or an excess of large values can help explain a poor rejection rate. Also consider repeating the assessment at plausible nuisance-parameter settings: a single simulation setting may not represent the range relevant to an application.

The main asymptotic alternative is the appropriate chi-bar-square mixture. It is principled when its assumptions and mixture weights apply, but it may be inaccurate at the finite sample size of interest. An ordinary \(\chi^2_1\) reference is not a generic repair: for the single-variance case it ignores the boundary mixture and has a different upper tail. Finite-sample simulation can diagnose the approximation, but its evidence is conditional on the specified model and design. It cannot protect against a misspecified random-effects distribution, an incorrect link, omitted dependence, or a simulation design that fails to match the intended analysis.

Key takeaway: A boundary mixture is an asymptotic reference distribution, not an exact finite-sample guarantee. Assess its calibration by simulating null data under a clearly stated design, estimating rejection rates, and comparing discrepancies with Monte Carlo uncertainty and model-fitting diagnostics.

Common Pitfall

Wrong reasoning: “The test uses the correct half-and-half mixture, so its type I error rate must be exactly 5% in my data.” The mixture result is asymptotic; the finite-sample null distribution can depart from it, especially with few independent clusters or weakly informed nuisance parameters.

Correction: Treat the nominal level as the target, not a guarantee. Check the actual finite-sample rejection rate in relevant null simulations, report the number of replicates and Monte Carlo uncertainty, and investigate fitting failures before concluding that the reference law is poorly calibrated.

Check Your Understanding

Answer each question using the definitions and calculations in this tutorial. Solutions are included below.

  1. In 1,500 simulated null data sets, a test rejects 105 times. Calculate the estimated rejection rate and its Monte Carlo standard error.
  2. Why may 10 observations in each of 8 clusters provide less information about a random-intercept variance than 10 observations in each of 40 clusters?
  3. For the half-at-zero, half-\(\chi^2_1\) reference, what \(\chi^2_1\) upper-tail probability corresponds to a 5% mixture-test level?
  4. Name two checks that should be made before interpreting an elevated simulated rejection rate as evidence of poor asymptotic calibration.

Solutions. (1) The estimated rate is \(105/1{,}500=0.0700\), or 7.00%. Its Monte Carlo standard error is \(\sqrt{0.0700(0.9300)/1{,}500}\approx0.00659\), or 0.659 percentage points. (2) The random-intercept variance describes differences between clusters, so 8 clusters provide only 8 independent cluster-level units; adding observations within those clusters does not create more independent clusters. (3) For a positive critical value, the mixture upper tail is one-half the \(\chi^2_1\) upper tail, so a 5% mixture tail corresponds to a 10% \(\chi^2_1\) upper tail. (4) For example, check that the null simulation matches the intended model and design, and verify convergence and consistent likelihood comparisons for both fitted models.

Clinical Biostats