arXiv:2611.16584econ.EMNov 2026

Manuscript Offprint

arXiv:2611.16584

Uniform Inference for Two-Way Clustered Data

Ulrich Hounyo, Jiahao Lin, Xiaojun Song, Hansheng Wang

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

We establish uniformly asymptotically exact inference for the population mean of two-way clustered data, allowing the data-generating process to vary with sample size. This finding does not contradict the well-known impossibility result of Menzel (2021), which places a fundamental limit on uniform estimation of the asymptotic distribution of the normalized full-array mean. We estimate the same population mean by averaging the sample means from random matchings. A closed-form standard error makes the resulting confidence interval straightforward to implement. The variance estimator is positive semidefinite and the studentized matching estimator is uniformly asymptotically standard normal. The cost of uniform validity is a slower convergence rate under degeneracy. We extend the result to smooth functions of GMM parameters, allowing the different moment components to exhibit different dependence regimes. In simulations, the proposed confidence intervals achieve coverage close to the nominal level across the dependence regimes considered.

Keywords: two-way clustering, uniform inference, random matching, GMM. JEL Classification: C12, C13, C14.

1 Introduction

Two-way clustering is widely used in empirical economics to account for dependence among observations that share a cluster in either of two dimensions. In a firm panel, for example, outcomes may be correlated both within a firm over time and across firms in the same period. The conventional approach estimates a parameter from the full array and adjusts its standard error for dependence within rows and columns (Cameron et al., 2011). Even for the sample mean, however, the dependence structure can affect the form of the limiting distribution. When row or column effects dominate, the normalized full-array mean typically has a Gaussian limit. As these effects weaken, interactions between rows and columns can produce a non-Gaussian limit. Menzel (2021, Proposition 4.1) shows that the limiting law of the normalized full-array mean cannot be estimated uniformly consistently over such sequences. We approach the inference problem by constructing a different estimator of the same population mean, for which Gaussian critical values are uniformly valid.

Our estimator averages the means obtained from repeated random matchings. Taking the dimension with fewer clusters as the rows, each matching assigns a distinct column to every row, uniformly at random and independently of the data. No two selected observations share a row or a column. Under separately exchangeable, dissociated sampling, they therefore form an i.i.d. sample from the marginal distribution. A single matching permits conventional inference for the population mean but uses only one observation per row. Additional matchings recover precision: conditional on the observed array, their means are independent and centered at the full-array mean. The choice of how many matchings to use matters because averaging too many can cause the estimator to inherit the non-Gaussian limit of the full-array mean.

We make four contributions. First, we characterize the limiting distribution of the matching estimator as the number of matchings varies. n exact variance decomposition separates the sampling variance of the full-array mean from the additional variance due to matching. Increasing the number of matchings improves precision, but it can also give the full-array error enough weight to produce a non-Gaussian limit. This trade-off motivates letting the number of matchings grow more slowly than the smaller cluster count to recover precision while retaining a Gaussian limit across dependence regimes.

Second, we provide a closed-form variance estimator that makes the confidence interval straightforward to compute. It combines estimates of row, column, and intersection variation with nonnegative weights. The estimate is positive semidefinite in every sample by construction. Inference then requires only the estimated standard error and a standard normal critical value, without a bootstrap or a preliminary test of the dependence regime.

Third, we establish uniformly asymptotically exact inference for the population mean. Under our moment conditions, the studentized matching estimator admits a uniform standard normal approximation whenever the number of matchings is fixed or grows at any rate slower than the smaller cluster count. If the number of matchings grows more slowly than the square root of that count, a uniform bound on the standardized fourth moment suffices for the same conclusion. The approximation holds uniformly over sequences of data-generating processes that may vary with sample size. The strength of clustering in either dimension need not converge, and the two cluster counts may grow at different rates.

Fourth, we extend the procedure to smooth functions of generalized method of moments (GMM) parameters, including regression coefficients. Under two-way clustering, different moments can converge at different rates. Estimation error in a slowly converging coefficient can then enter the limiting distribution of a faster one through a quadratic term (Davezies et al., 2025, Section 3). We show that the same restriction on the number of matchings makes this term negligible relative to the standard error of the target. Applying the variance estimator to the estimated influence function therefore gives uniformly asymptotically exact inference even when the moment components follow different dependence regimes.

Our analysis complements the literature on inference based on the full array. Davezies et al. (2021) develop empirical process theory for exchangeable arrays, and Chiang and Sasaki (2023) give conditions under which conventional two-way standard errors yield valid Gaussian inference. MacKinnon et al. (2021) study wild bootstrap inference for regression, while Chiang, Matsushita and Otsu (2025a) construct an empirical likelihood statistic using estimates that leave out rows or columns. Davezies et al. (2025) develop analytic tests that control size uniformly over their class. Their tests are asymptotically exact in Gaussian regimes and can be conservative in non-Gaussian regimes. By changing the estimator, we obtain exact asymptotic coverage even for laws under which the full-array mean has a non-Gaussian limit, at a cost in precision that we quantify.

Menzel (2021, Supplemental Appendix C.3) shows that, when the observation pattern is independent of the data, observing only a vanishing fraction of intersections can yield a Gaussian limit for the sample mean. Chiang, Li and Sasaki (2025b) establish asymptotic normality under Bernoulli subsampling for each fixed data-generating process. We select intersections by repeated matching and establish asymptotically exact coverage uniformly over laws in which row and column effects may weaken or vanish as the sample size grows. The role of the number of sampled terms in determining the limiting distribution also arises in the theory of incomplete UU-statistics (Janson, 1984; Chen and Kato, 2019).

Section 2 introduces the two-way clustering framework and describes how the dependence structure affects the limiting distribution of the full-array mean. Section 3 presents the matching estimator, shows how the number of matchings affects its precision and limiting distribution, and establishes uniformly asymptotically exact coverage for the resulting interval. Section 4 extends the results to smooth functions of GMM parameters. Section 5 reports Monte Carlo evidence on confidence interval coverage and length. Section 6 concludes. The appendix contains the proofs.