EconBase
← Back to paper

A Test for Jumps in Metric-Space Conditional Means

Extracted main text — title through conclusion, appendix excluded. This is what our citation measures are computed over, published so the extraction can be checked by eye.

60,056 characters · 17 sections · 56 citation commands

Rendered from LaTeX for readability, not typeset faithfully. Citation keys are highlighted; maths is left as source; figures, tables and equation environments are summarised rather than reproduced; unrecognised commands are greyed out so nothing is silently dropped. Email addresses are removed.

A Test for Jumps in Metric-Space Conditional Means With Applications to Compositional and Network Data

\def\spacingset#1{ {#1}} \spacingset{1}

\if11 \fi

\if01 {

center[center omitted — 35 chars of source]

} \fi

abstractStandard methods for detecting discontinuities in conditional means are not applicable to outcomes that are complex, non-Euclidean objects like distributions, networks, or covariance matrices. This article develops a nonparametric test for jumps in conditional means when outcomes lie in a non-Euclidean metric space. Using local Fr\'echet regression, the method estimates a mean path on either side of a candidate cutoff. This extends existing $k$-sample tests to a non-parametric regression setting with metric-space valued outcomes. I establish the asymptotic distribution of the test and its consistency against contiguous alternatives. For this, I derive a central limit theorem for the local estimator of the conditional Fr\'echet variance and a consistent estimator of its asymptotic variance. Simulations confirm nominal size control and robust power in finite samples. Two empirical illustrations demonstrate the method's ability to reveal discontinuities missed by scalar-based tests. I find sharp changes in (i) work-from-home compositions at an income threshold for non-compete enforceability and (ii) national input-output networks following the loss of preferential U.S. trade access. These findings show the value of analyzing regression outcomes in their native metric spaces.

{\it Keywords:} Fr\'echet regression, regression discontinuity, changepoint, metric-space data, local polynomial regression, structural break

\spacingset{1.45}

Introduction

Testing for a discontinuity in a conditional mean function is a central task in modern econometrics and statistics, forming the basis of the regression discontinuity (RD) design for causal inference thistlethwaite1960regression, changepoint detection page1957problems, and structural break tests chow1960tests. Under the assumption that the path of conditional means evolves smoothly, discontinuities can reveal important insights into the data-generating process, such as the presence of regime changes, treatment effects, or structural breaks. While central to applied work, standard methods are predicated on scalar-valued outcomes. This is a significant limitation, as many critical questions in science involve outcomes that are inherently complex, non-Euclidean objects. For instance, how does a negative trade shock alter the network structure of a national economy? Or how does crossing a critical temperature threshold trigger an abrupt change in the distribution of daily rainfall? Answering such questions requires a methodological framework that can detect jumps or breaks in otherwise smoothly evolving distributions, networks, or other metric-space valued data.

A framework for analyzing such data can be built on the Fr\'echet mean, which generalizes the concept of mathematical expectation to general metric spaces frechet1948elements. In a regression context, interest lies specifically in the conditional Fr\'echet mean petersen2019frechet, which describes the central tendency of a metric-valued outcome $Y$ as a function of a scalar covariate $X$. A direct test on the conditional Fr\'echet means themselves, however, is generally not feasible. Because these means are elements of the object space, which often lacks additive structure---for example, they are themselves networks or distributions---they cannot be directly compared through differencing. This prevents the use of standard test statistics that rely on simple algebraic comparisons.

This article develops a novel framework that overcomes this challenge. Since conditional Fr\'echet means cannot be differenced, my approach instead detects discontinuities by comparing their associated conditional Fr\'echet variances, which are scalars. This extends the variance-based logic of dubey2019frechet from a simple $k$-sample (or group/multi-sample) comparison kruskal1952use to the more complex, nonparametric regression setting where conditional means and variances evolve as arbitrary smooth functions. To operationalize this, I adapt the local Fr\'echet regression estimator of petersen2019frechet to estimate conditional Fr\'echet variances on either side of a jump point, as well as by pooling across the jump. The resulting test statistic compares the pooled variance at the jump point to the one-sided variances, providing the first general method for detecting structural breaks in metric-space regression functions. To establish the asymptotic validity and consistency of this test, I derive a new central limit theorem for the local estimator of the conditional Fr\'echet variance, which generalizes the canonical results of fan1998efficient.

In support of the theoretical results, I report simulation exercises for three metric spaces of interest: univariate density functions, graph Laplacians of networks, and covariance matrices. These results indicate that the test has excellent size control in finite samples and quickly converges to the nominal level. Moreover, it exhibits robust power, reliably detecting discontinuities in all three settings even with modest sample sizes and small jump magnitudes. A comparison to a localized adaptation of the $k$-sample test of dubey2019frechet to the regression setting illustrates the usefulness of the local regression approach. While the adaptation of the $k$-sample test does achieve nominal coverage under a piecewise-constant signal, it severely overrejects the null under a piecewise-smooth one, unlike the proposed test.

To demonstrate the test's practical utility, I present two empirical applications. First, I find a significant structural shift in the composition of work-from-home (WFH) arrangements in Washington State at the income threshold where non-compete agreements become legally enforceable. This suggests that WFH was an important bargaining margin during the sample period, which covered the main COVID-19 years (2020-2023). Second, I detect an abrupt change in the structure of national input-output networks for countries that lose preferential trade access under the US Generalized System of Preferences after its reinstatement in 2015. This indicates that this relatively modest program, which has been subject to repeated legislative lapses and reauthorizations, nonetheless has a meaningful impact on the production networks of developing countries reliant on it. In both applications, existing tests for jumps in scalar-valued outcomes, derived from the complex objects, fail to detect statistically significant jumps. Thus, these applications illustrate the ability of the proposed method to uncover nuanced structural changes that are invisible to methods that ignore the metric space topology.

This article contributes to several strands of the statistics and econometrics literature. First, it advances the field of Fr\'echet regression petersen2019frechet by providing a novel tool for inference on local Fr\'echet regression. It extends existing group-comparison and changepoint tests for non-Euclidean objects dubey2019frechet, dubey2020frechet, chen2017new, szekely2013energy, wang2024nonparametric, muller2024anova, jiang2024two, zhang2025generalized, zhang2025change to a fully nonparametric regression setting. Compared to the growing body of inferential work in this area chen2022uniform, bhattacharjee2023single, kurisu2024empirical, van2025regression, the test proposed here generalizes to a larger class of metric spaces, works in the nonparametric regression setting, or both, and does so under milder regularity conditions, allowing for broad applicability.

Second, this article contributes to the large literatures on changepoint detection page1957problems, regression discontinuity design (RDD) hahn2001identification, and structural break estimation chow1960tests. My contribution is to develop the first unified framework for testing discontinuities in metric-space conditional means, moving beyond functional data to general metric-space valued data such as distributions, networks, or spheres Berkes2009Detecting. Recent research has developed testing approaches tailored to specific types of metric spaces like networks enikeeva2025change, madrid2023change, kei2024change, penaloza2024changepoint, bhattacharjee2020change or covariance matrices dornemann2024detecting, ryan2023detecting, cho2025change, avanesov2018change, dette2022estimating, Aue2009Break. These methods usually assume specific generative models, such as the stochastic block model for networks, and piecewise-constant signals. By contrast, the proposed test is model-agnostic and allows for piecewise-smooth processes, in addition to being applicable to many different metric spaces.

Finally, though the focus is on testing, this article contributes to the emerging literature on RDD for non-Euclidean outcomes. For the case of distribution-valued outcomes, van2025regression provided the first treatment of this problem, developing bias-corrected inference and establishing the complete inferential framework necessary for applied research. For that particular metric space, the linear structure of univariate quantile functions allowed to move beyond just testing for a jump to also providing point estimates and confidence bands for the jump's magnitude. Conversely, the test developed in the current article is more general and works for metric spaces that do not have such linear structure. Subsequently and independently, kurisu2025regression proposed a conceptual extension of RDD to general geodesic metric spaces. While their framework encompasses a broad class of metric spaces, it focuses primarily on identification and estimation, leaving the question of inference—and particularly hypothesis testing—unaddressed. The present article contributes to this literature by developing the first formal test for discontinuities in conditional Fr\'echet means in general metric spaces, providing an inferential tool that helps operationalize metric space RDDs for practical applications. In doing so, I build upon the foundation established in van2025regression while extending the scope to the general metric spaces considered in kurisu2025regression.

The remainder of the article develops the methodology and main theoretical results (Sections (ref)--(ref)), presents simulation evidence (Section (ref)), illustrates the method with two empirical applications (Section (ref)), and concludes.

Setup and Motivation

Let $(\Omega, d)$ be a bounded metric space, where $d:\Omega \times \Omega \to [0, \infty)$ is a distance function. Let $Y$ be a random object taking values in $\Omega$, and $X$ be a real-valued random variable representing a covariate or conditioning variable. We are interested in the behavior of $Y$ conditional on $X$. Denote their joint distribution $F$ and the conditional distribution of $Y$ given $X$ as $F_{Y \mid X}$.

Conditional Fr\'echet Means and Variances

The concept of a conditional Fr\'echet mean arises as a natural generalization of the Euclidean mean. Let $Z \in \mathbb{R}$, then the conditional expectation $E[Z \mid X=x]$ can be defined as the unique minimizer $f(x)$ of the mean squared error, \[ E[Z \mid X=x] \coloneqq \operatorname*{\arg\!\min}_{f(x) \in \mathbb{R}} E[ d_E\left(Z,f(x) \right)^2 \mid X=x], \] where $d_E(z_1,z_2) \coloneqq \| z_1 - z_2\|$ the standard Euclidean metric.

The conditional Fr\'echet mean of $Y \in \Omega$ given $X=x$, where $Y$ is a metric-space valued random object, is defined analogously by replacing the Euclidean metric with the more general distance metric $d$ petersen2019frechet,

equation[equation omitted — 233 chars of source]

and note that the expectation is taken over $F_{Y \mid x}$. In words, the conditional Fr\'echet mean $m_{\oplus}(x)$ is an element in $\Omega$ that minimizes the expected squared distance to $Y$ among observations with $X=x$. In that sense, it generalizes the standard Euclidean conditional expectation, which it includes as a special case. Beyond this natural interpretation as a generalized expectation, an important benefit of working with the Fr\'echet mean is that it lies in the metric space itself and hence captures its topology (e.g., it is a network Laplacian), in contrast to other scalar-valued statistics that one may derive from the metric space-valued objects (e.g., the average centrality of the networks). Of course, what aspect of its topology it captures is determined by the choice of distance metric $d$. Nonetheless, the test proposed in this article works for many metrics and hence does not hinge on a specific choice.

The corresponding conditional Fr\'echet variance is,

equation[equation omitted — 155 chars of source]

This measures the expected squared dispersion of $Y$ around its conditional Fr\'echet mean $m_{\oplus}(x)$, analogous to the standard Euclidean variance.

We are interested in a potential discontinuity in the conditional Fr\'echet mean at a specific point $X=c \in \mathbb{R}$. To formalize this, define the conditional Fr\'echet means from the left and right of $c$,

equation[equation omitted — 185 chars of source]

These represent the central tendencies of $Y$ as $X$ approaches $c$ from below ($m_{-, \oplus}$) or above ($m_{+, \oplus}$). The corresponding “one-sided” conditional Fr\'echet variances are,

equation[equation omitted — 157 chars of source]

Assuming these limits exist, one can also relate them to underlying “counterfactual” Fr\'echet means at $X=c$ for a connection to causal inference, specifically the regression discontinuity design van2025regression, kurisu2025regression. Since the focus of this article is on testing, I do not discuss this further here.

The null hypothesis of no discontinuity in the conditional Fr\'echet mean at $c$ is,

equation*[equation* omitted — 64 chars of source]

where $Y_1=Y_2$ for $Y_1, Y_2 \in \Omega$ is defined as $d(Y_1,Y_2)=0$. The null hypothesis of no discontinuity in the conditional Fr\'echet variance is,

equation*[equation* omitted — 63 chars of source]

Similar to the classical analysis of variance test, the proposed test will assess $H_0^{\text{mean}}$ and $H_0^{\text{var}}$ jointly, that is,

equation*[equation* omitted — 65 chars of source]

while the alternative, $H_1$, is that at least one of these conditions does not hold.

Motivating Settings

To motivate the problem further, I now discuss several classes of problems and specific applications where detecting jumps in the conditional mean path of a metric-space valued outcome can be highly valuable. Below, I further motivate the test with two empirical illustrations on real-world data.

example[Regression Discontinuity Design (RDD)] The RDD is a powerful quasi-experimental design for causal inference hahn2001identification, thistlethwaite1960regression, hinging on the estimation of a discontinuity in $E[Z|X=x]$ for $Z \in \mathbb{R}$ at a known threshold $c$ of a running variable $X$. The proposed framework allows the outcome to be a complex, non-Euclidean object. \begin{itemize} • Income Distribution Response to Democratic Governors. Consider a “close-election” RDD which exploits the fact that when a Democratic governor's vote share ($X$) exceeds 50% of the two-party vote, they become elected ($T$). The outcome $Y_i$ for state $i$ is the distribution of family income in that state. A suitable metric space for this setting is the space of cumulative distribution functions equipped with the 2-Wasserstein distance. This is the application in van2025regression, which found negative effects of Democratic governorships on the top of the income distribution but not elsewhere. As mentioned, for this particular metric space, one can also construct tests using the uniform confidence bands developed in that article. \end{itemize} The test proposed here allows for formally assessing if $m_{+,\oplus} \neq m_{-,\oplus}$ in such RDD settings. See also kurisu2025regression for further examples of metric-space valued RD designs.
example[Changepoint Detection in Metric-Space Valued Processes] A central task in many disciplines is to identify changepoints where the underlying data-generating process for observations $Y_x$ (indexed by a continuous variable $X$, such as time or a spatial coordinate) alters its central tendency aue2013break. A statistically significant jump in $m_{\oplus}(x)$ at $X=c$ indicates that such a changepoint exists. \begin{itemize} • Neuroscience: Brain Development Trajectories: Let $X$ be the chronological age of subjects. $Y_x$ could represent the structural brain network of an individual of age $x$, perhaps derived from diffusion tensor imaging (DTI) and viewed as a graph object. Using a graph metric (e.g., based on the Frobenius norm or spectral graph distances), a jump in the Fr\'echet mean brain network structure at a critical developmental age $c$ could highlight a significant maturational shift in the topology of typical brain connectivity fair2009functional, dubey2019frechet. \end{itemize}
example[Threshold Effects in Complex Systems] More broadly, the framework applies to detecting threshold effects where the central tendency of a metric-space outcome $Y$ changes abruptly when a continuous underlying factor $X$ crosses a critical value $c$. This generalizes the search for non-linearities and critical transitions. \begin{itemize} • Ecology: Community Composition along Environmental Gradients: Let $X$ be a continuous environmental gradient (e.g., soil pH, salinity). $Y_x$ is the ecological community composition (e.g., a vector of species abundances, or a set of species presence/absence) at a site with gradient value $x$. Using a suitable distance metric such as the Aitchison or geodesic distance, a jump in the Fr\'echet mean community composition at a specific gradient level $c$ would indicate an ecotone or an abrupt shift in the typical community structure killick2012optimal. \end{itemize}

In all these settings, the objects $Y_i$ possess a complex structure. The core statistical question is whether the conditional Fr\'echet mean path $m_{\oplus}(x)$, “$E[Y|X=x]$”, exhibits a significant jump at $X=c$. The subsequent sections develop the formal tools to test this hypothesis.

One-Sided Local Fr\'echet Regression

To estimate the conditional means and variances from the left and right, $m_{\pm, \oplus}, V_{\pm, \oplus}$, I rely on a one-sided version of local Fr\'echet regression petersen2019frechet. Assume one observes i.i.d. data $\{(Y_i, X_i)\}_{i=1}^n \sim F$. Then, the one-sided estimators are defined as,

equation[equation omitted — 246 chars of source]

where $h_m$ is a bandwidth and $s_{\pm,in}(c,h)$ are standard one-sided local linear regression weights that use data only to the left or right of the cutoff, respectively,

align*[align* omitted — 499 chars of source]

The weights for the left-sided estimator, $s_{-, i n}(c, h)$, are defined analogously using observations where $X_i < c$ and $X_k < c$.

The corresponding population (or pseudo-true) minimizers are denoted $\tilde{l}_{\pm, \oplus}$ with objective function $\tilde{L}_{\pm, \oplus}(\omega)$. The consistency of these estimators is a straightforward extension of the arguments in petersen2019frechet and kurisu2025regression.

The sample estimators of the conditional Fr\'echet variances from above ($V_{+,\oplus}$) and below ($V_{-,\oplus}$) are then simply,

equation[equation omitted — 141 chars of source]

where I use a different bandwidth $h$ for the variance than for the mean estimation ($h_m$) to allow for different degrees of smoothing. The asymptotic variance of $d^2(Y, m_{\pm,\oplus})$ conditional on $X=c$ is denoted $\sigma_{\pm, V}^2 \coloneqq \operatorname{var}\left(d^2(Y, m_{\pm, \oplus}) \mid X=c \right)$, and its sample estimator $\hat{\sigma}_{\pm, V}^2$ is constructed as, \[ \hat{\sigma}_{\pm, V}^2=\frac{1}{n} \sum_{i=1}^n s_{\pm,in}(c,h) d^4(Y_i, \hat{l}_{\pm, \oplus}) - \left(\frac{1}{n} \sum_{i=1}^n s_{\pm,in}(c,h) d^2(Y_i, \hat{l}_{\pm, \oplus})\right)^2, \] by the variance shortcut formula. The asymptotic normality of $\hat{V}_{\pm, \oplus}$ and consistency of $\hat{\sigma}_{\pm, V}^2$ are established below. Bandwidth selection is done by a cross-validation procedure that aims to minimize the out-of-sample prediction on both sides of the cutoff simultaneously (see Appendix (ref) for more details).

Pooled Estimators

To construct the ANOVA-style test, I also need pooled estimators that do not distinguish between observations above and below $c$. The pooled local Fr\'echet mean estimator is, \[ \hat{l}_{p,\oplus} \coloneqq \operatorname*{\arg\!\min}_{\omega \in \Omega} \frac1n \sum_{i=1}^n s_{p,in}(c,h) d^2(Y_i, \omega), \] and the pooled conditional Fr\'echet variance estimator is, \[ \hat{V}_{p,\oplus} \coloneqq \frac1n \sum_{i=1}^n s_{p,in}(c,h) d^2(Y_i, \hat{l}_{p,\oplus}), \] where $s_{p,in}(c,h) = \frac12 s_{+,in}(c,h) + \frac12 s_{-,in}(c,h)$. The use of uniform weights $\frac12$ assumes that the same bandwidth $h$ is used on both sides, which can easily be relaxed. The corresponding pooled population moments are,

align*[align* omitted — 295 chars of source]

i.e., the pooled population estimators pool across the one-sided objective functions. The consistency of these pooled estimators is proved in Proposition (ref) in the Appendix.

A Jump Test for Conditional Metric-Space Means

To test for a discontinuity, I propose an ANOVA-style test statistic based on these one-sided and pooled local Fr\'echet regression estimators. Define auxiliary statistics,

align[align omitted — 311 chars of source]

Here, $U_n$ tests for differences in variances ($H_0^{\text{var}}$). Under the null of equal variances (i.e. $U_n \to 0$), any difference between the pooled and one-sided variances reflected in $F_n$ must be driven by differences in means. Hence, $F_n$ tests for differences in means ($H_0^{\text{mean}}$).

The combined test statistic is,

equation[equation omitted — 163 chars of source]

Here, the $F_n$ term is squared and scaled by its variance estimate so that it has the same variability as the $U_n$ term.

Main Results

Assumptions

I require the following assumptions for the asymptotic results. Throughout, I assume that the metric space $\Omega$ is bounded.

assumpL[Sampling] $\{ (Y_i, X_i) \}_{i=1}^n$ are i.i.d. copies of a random element $(Y,X)$ defined on a probability space $(\Xi, \mathcal{F}, P)$. $Y \in \Omega$, $X \in \mathbb{R}$.
assumpL[Densities and Continuity] The following hold for some $\varepsilon>0$. (a) The density $f_X$ is twice continuously differentiable on $(c-\varepsilon,c+\varepsilon)$, bounded away from $0$ and $\infty$, and $f_X(c)>0$. (b) For every $y\in\Omega$ the function $g_y(x)=\partial_x F_{X\mid Y}(x\mid y)$ is twice continuously differentiable on $(c-\varepsilon,c+\varepsilon)$, and $ \sup_{y\in\Omega}\; \max_{k=0,1,2}\; \sup_{x\in(c-\varepsilon,c+\varepsilon)} |g_y^{\,(k)}(x)|\;<\;\infty. $ (c) For every open set \(U\subset\Omega\) with $F_Y(\partial U)=0$ the map $ x \;\longmapsto\; \int_U dF_{Y\mid X=x}(y) $ is twice continuously differentiable on the open intervals $(c-\varepsilon,c)$ and $(c,c+\varepsilon)$.

For each side separately, this assumption is identical to the one in petersen2019frechet, and generalizes the standard distributional assumptions imposed in local polynomial regression.

assumpL[Uniqueness of Fr\'echet Means] The Fr\'echet means $m_{\pm,\oplus}$ and $m_{p,\oplus}$ exist and are unique. For all $n$, their estimators $\tilde{l}_{\pm,\oplus}$, $\hat{l}_{\pm,\oplus}$, $\tilde{l}_{p,\oplus}$, $\hat{l}_{p,\oplus}$ exist and are unique (the hatted estimators almost surely). Additionally, for any $\varepsilon>0$: $ \inf _{d\left(\omega, m_{\pm,\oplus}\right)>\varepsilon}\left\{M_{\pm,\oplus}(\omega)-M_{\pm,\oplus}\left(m_{\pm,\oplus}\right)\right\}>0,$ $\liminf_n \inf _{d\left(\omega, \tilde{l}_{\pm,\oplus}\right)>\varepsilon}\left\{\tilde{L}_{\pm,n}(\omega)-\tilde{L}_{\pm,n}\left(\tilde{l}_{\pm,\oplus}\right)\right\}>0$, $ \liminf _n \inf _{d\left(\omega, \hat{l}_{\pm,\oplus}\right)>\varepsilon}\left\{\hat{L}_{\pm,n}(\omega)-\hat{L}_{\pm,n}\left(\hat{l}_{\pm,\oplus}\right)\right\}>0 \quad \text{(a.s.)}$. Analogous conditions hold for the pooled estimators $\tilde{l}_{p,\oplus}$ and $\hat{l}_{p,\oplus}$ with respect to $M_{p,\oplus}(\omega)$, denoted as Assumption (ref)-p.
assumpL[Curvature Conditions] \begin{enumerate}[(i)] • Provided $d\left(\omega, m_{\pm,\oplus}\right)<\eta_1$, there exist $\eta_1>0, C_1>0$ and $\beta_1>1$ such that, $$ M_{\pm,\oplus}(\omega)-M_{\pm,\oplus}\left(m_{\pm,\oplus}\right) \geq C_1 d\left(\omega, m_{\pm,\oplus}\right)^{\beta_1}. $$ • Provided $d\left(\omega, \tilde{l}_{\pm,\oplus}\right)<\eta_2$, there exists $\eta_2>0, C_2>0$ and $\beta_2>1$ such that: $$ \underset{n}{\liminf }\left[\tilde{L}_{\pm,n}(\omega)-\tilde{L}_{\pm,n}\left(\tilde{l}_{\pm,\oplus}\right)\right] \geq C_2 d\left(\omega, \tilde{l}_{\pm,\oplus}\right)^{\beta_2}. $$ \end{enumerate} Analogous conditions hold for $M_{p,\oplus}(\omega)$ and $\tilde{L}_{p,n}(\omega)$, denote these as Assumption (ref)-p.

As mentioned, the uniqueness and curvature assumptions are satisfied for all specific metric spaces considered in this article petersen2019frechet, zhou2022network. More generally, KimuraBondell2025Frechet characterize a class of metric spaces that have unique conditional Fr\'echet means.

The following are generalizations of standard local polynomial regression assumptions,

assumpK[Kernel] The kernel $K: \mathbb{R} \to [0,\infty)$ is a continuous probability density function, symmetric around zero, with compact support.
assumpK[Bandwidth] (a) The bandwidth sequence $h=h(n)$, satisfies $h \to 0, \, h_m \to 0$, $nh \to \infty, \, n h_m \to \infty$. (b) $nh h_m^{4/(\beta_1-1)} \to 0$. (c) $h_m(n) = \varrho_m n^{-\theta}$ for some $\varrho_m > 0$, $\theta > 0$, and $h(n) = \varrho n^{-\gamma}$ for some $\varrho > 0$, $\gamma > \theta$, $\gamma > \frac15$. (d) $(nh)^{1/2} (nh_m)^{-1/(2(\beta_2-1))} \to 0$, where $\beta_1, \beta_2$ control the curvature of the Fr\'echet mean estimators in Assumption (ref).

First, the variance bandwidth $h$ must undersmooth the variance estimator $(\gamma > 1/5$) in (c) to eliminate its own asymptotic bias. Second, the variance bandwidth $h$ is assumed to converge faster than the mean bandwidth $h_m$ ($\gamma > \theta$). This baseline relationship ensures that for sufficiently regular problems ($1 < \beta_2 \le 2$), the stochastic error from the first stage is automatically controlled. The relative rate condition in (b) which handles the bias component of the first-stage error and essentially requires that the mean bandwidth $h_m$ cannot converge too slowly. This ensures the mean estimator $\hat{l}_{\oplus}$ does not itself need to be undersmoothed---an adaptive property that generalizes the findings of fan1998efficient. Finally, the condition in (d) handles the stochastic component for less regular problems ($\beta_2 > 2$), demanding a more aggressive separation between the bandwidths as the Fr\'echet mean's objective function becomes less smooth. Note that $\beta_2 \leq 2$ for all metric spaces considered in this article, see petersen2019frechet, zhou2022network. These explicit conditions are necessary because, unlike in the Euclidean case, there are no algebraic cancellations to automatically suppress the first-stage error in a general metric space.

Finally, let $N(\epsilon, S, d)$ be the $\epsilon$-covering number of a set $S \subseteq \Omega$. The entropy integral for a $\delta$-ball $B_\delta(\omega_0)$ around $\omega_0 \in \Omega$ is $J(\delta, \omega_0) \coloneqq \int_0^1 \sqrt{1+\log N\left(\delta \epsilon, B_\delta(\omega_0), d\right)} \mathrm{d} \epsilon $.

assumpT[Local Entropy Condition] For any $\omega_0 \in \{m_{-,\oplus}, m_{+,\oplus}, m_{p,\oplus}\}$, $\delta J(\delta, \omega_0) \rightarrow 0$ as $\delta \rightarrow 0$.
assumpT[Global Entropy Condition] The entropy integral of $\Omega$ is finite: $\int_0^1\sqrt{1+\log N(\epsilon, \Omega, d)} \mathrm{d} \epsilon < \infty$. This is a stronger condition, used for uniform consistency results (e.g., Theorem (ref)).

Note that for most results in this article, I only need the weaker local entropy condition (ref), which is also weaker than its equivalent in dubey2019frechet since the latter imposes it for all $\omega \in \Omega$. The stronger global entropy condition (ref) is only required for the power results.

Central Limit Theorem for Conditional Fr\'echet Variance

First, I establish the asymptotic distribution of the estimated conditional Fr\'echet variances $\hat{V}_{\pm, \oplus}$. Denote convergence in distribution with $\xrightarrow[]{d}$.

theorem[CLT for Conditional Fr\'echet Variance] Let Assumptions (ref)-(ref) hold. Let $\hat{f}_X(c)$ be a $\sqrt{nh}$-consistent estimator for $f_X(c)$. Then, \[ \sqrt{nh} \left( \hat{V}_{\pm, \oplus} - V_{\pm, \oplus} \right) / \left( \sqrt{\frac{S_\pm}{\hat{f}_X(c)}} \hat{\sigma}_{\pm, V} \right) \xrightarrow[]{d} N\left(0, 1\right), \] where \[ S_\pm \coloneqq \frac{\int_{0}^\infty (K_{\pm,12} - u K_{\pm,11})^2 K^2(u) \mathop{}\!\mathrm{d} u}{ (K_{\pm,12} K_{\pm,10} - K^2_{\pm,11})^2 }. \]

The proof, detailed in Appendix (ref), follows by decomposing the estimation error into a Bahadur-style representation. The leading stochastic term is shown to be asymptotically normal via a Lyapunov CLT, while the plug-in and bias terms are asymptotically negligible under our bandwidth assumptions. The key intuition behind why one can establish a classical CLT is that all the geometry of the complex objects is absorbed into the squared distance $d^{2}(Y_i,m_{\pm,\oplus})$. Further, because the metric space \((\Omega,d)\) is assumed to be bounded, those distances possess uniformly bounded moments of every order, delivering the necessary control over the asymptotic distribution.

Asymptotic Distribution of the Test

The following results determine the asymptotics of the test statistics in Eqs. (ref) and (ref) under the respective null hypotheses,

propositionUnder $H_0^{\text{mean}}: m_{+,\oplus}=m_{-,\oplus}$ and Assumptions (ref)-(ref) (including (ref)-p, (ref)-p for pooled estimators), $$ \sqrt{nh_n} F_n = o_p(1). $$
propositionUnder $H_0^{\text{var}}: V_{+,\oplus}=V_{-,\oplus}$, and Assumptions (ref)-(ref), $$ nh_n U_n \xrightarrow[]{d} \chi_{1}^2, $$ where $\chi_{1}^2$ is the chi-squared distribution with 1 degree of freedom.

Proofs are in Appendix (ref). The result for $U_n$ follows straightforwardly from the central limit theorem derived in the previous section. The result for $F_n$ is intuitive: under the null, the variance estimators converge to the same quantity, and their difference converges faster to $0$ than each separate term does.

For the combined test statistic in (ref), the following result obtains.

corollaryUnder $H_0: m_{+,\oplus}=m_{-,\oplus}$ and $V_{+,\oplus}=V_{-,\oplus}$, and Assumptions (ref)-(ref) (including -p versions), $$ T_n \to_d \chi_{1}^2. $$

This follows because, under the joint null, the contribution of the $F_n$ term vanishes and hence the asymptotic distribution of the $U_n$ term dominates. Based on this corollary, the rejection region for a test of size $\alpha$ is $R_{n, \alpha}=\{T_n>\chi_{1, \alpha}^2\}$. Since this is an asymptotic result, one may worry that the $F_n$ term can lead to size distortions in finite sample. While the simulations in Section (ref) do reveal slight overcoverage in very small samples, the test's acceptance probability rapidly converges to the nominal level.

Consistency of the Test

To study the power of the test, define the population counterparts, \[ F_{pop}=V_{p,\oplus} - \left( \frac12 V_{+,\oplus} + \frac12 V_{-,\oplus} \right), \quad U_{pop}=\frac{\left(V_{+, \oplus}-V_{-, \oplus}\right)^2}{\left(S_{+} \sigma_{+, V}^2/f_X(c)\right) + \left(S_{-} \sigma_{-, V}^2/f_X(c)\right)}. \]

propositionUnder Assumptions (ref)-(ref) (including -p versions) and (ref), as $n \to \infty$, $|F_n - F_{pop}| = o_p(1)$. $F_{pop} \ge 0$, and $F_{pop}=0$ if and only if $m_{p,\oplus} = m_{+,\oplus} = m_{-,\oplus}$. Also, $|U_n - U_{pop}| = o_p(1)$, and $U_{pop} \ge 0$, with $U_{pop}=0$ if and only if $V_{+,\oplus}=V_{-,\oplus}$.

This proposition provides the crucial link between the test statistics and the hypotheses, showing that $F_n$ and $U_n$ are consistent for population measures of mean and variance differences, respectively. These population measures are zero if and only if no discontinuity exists. This equivalence is immediate for $U_n$, while for $F_n$, it follows from the uniqueness of the Fr\'echet means.

Finally, consider sequences of alternatives $H_A^{(n)}$ where $F_{pop} \ge a_n$ or $U_{pop} \ge b_n$ for sequences $a_n, b_n \ge 0$ where either $a_n >0$ or $b_n>0$. The power function is $\beta_{H_A^{(n)}}=\inf_{(F_{pop}, U_{pop}) \in H_A^{(n)}} P(T_n > \chi_{1,\alpha}^2)$.

theorem[Consistency of the Test] Under Assumptions (ref)-(ref) (including -p versions), for sequences of alternatives $H_A^{(n)}$ and any $\alpha >0$, \begin{enumerate}[(a)] • If $F_{pop} \ge a_n$ with $(nh_n)^{1/2} a_n \rightarrow \infty$, then $\beta_{H_A^{(n)}} \rightarrow 1$. • If $U_{pop} \ge b_n$ with $nh_n b_n \rightarrow \infty$, then $\beta_{H_A^{(n)}} \rightarrow 1$. \end{enumerate}

This shows the test will pick up any jump whose size does not shrink faster than the sampling noise inside the bandwidth window, i.e., the test is consistent against contiguous alternatives.

Simulations

To evaluate the test's finite-sample performance, I carry out Monte Carlo simulations in three metric spaces: probability densities, covariance matrices, and graph Laplacians of networks. I consider both piecewise-smooth and piecewise-constant data generating processes (DGPs) to assess the usefulness of the nonparametric regression approach (see Appendix (ref) for full details). Though there are no general metric-space tests that directly compete with the proposed one, I adapt the $k$-sample test of dubey2019frechet to compare the two means in a shrinking window around the cutoff to illustrate the value of the nonparametric regression approach. Since this is essentially equivalent to a local constant regression approach, we should expect it to do well on the piecewise-constant signal but overreject on the piecewise-smooth one.

table[table omitted — 1,124 chars of source]

The results confirm the asymptotic theory. Table (ref) shows that the proposed test exhibits excellent size control, with empirical rejection rates under the null quickly converging to the nominal 5% level as the sample size increases. The test also demonstrates robust power across all settings. Figure (ref) highlights the key advantage of the regression-based approach. While both tests perform well under a simple piecewise-constant signal (right panels) -- with the $k$-sample test expectedly converging faster due to its parametric rate --, the localized $k$-sample test severely over-rejects the null under the piecewise-smooth DGPs (left panels). My proposed test, by contrast, maintains correct size while reliably detecting true jumps, confirming its utility for a broader and more realistic class of problems.

figure[figure omitted — 835 chars of source]

Empirical Illustrations

Non-Compete Agreements and the Composition of Work from Home

\paragraph{Question.} Here, I apply the test to investigate how the enforceability of non-compete agreements (NCAs) affects the composition of work-from-home (WFH) arrangements. In 2020, Washington state enacted a law (RCW 49.62) that makes NCAs enforceable only for employees whose annual earnings exceed a specific, inflation-adjusted threshold of approximately \$100,000. This policy creates a sharp discontinuity where non-compete agreements are unenforceable below the income threshold but become enforceable when an employee's salary crosses it. Unlike a traditional RD design, however, I cannot rule out manipulation around the threshold. Indeed, the object of interest is precisely how firms and workers strategically adjust employment terms when the legal landscape of post-employment mobility changes.

My central hypothesis is that WFH arrangements become a key bargaining margin, particularly during the sample period which covered the COVID-19 pandemic years when WFH became ubiquitous. When an employee's salary crosses the threshold, rendering an NCA enforceable, their ability to switch to a local competitor is curtailed. One might expect a worker to respond by seeking employment with an out-of-state firm to escape the policy's reach. However, my results below do not reveal any significant jump in the probability of working for an out-of-state employer at the threshold. This suggests that adjustments are more likely to occur within the current employment relationship. In particular, faced with a binding NCA, a high-earning employee may demand non-monetary compensation for their reduced future mobility. From the firm's perspective, granting greater WFH flexibility could be a valuable, low-cost concession to attract these employees. Therefore, I test for an abrupt shift in the average WFH composition at the earnings threshold for newly hired employees.

Previous literature has found that only 10% of employees bargain over non-compete agreements starr2021noncompete, though this was estimated prior to the spread of non-compete laws such as Washington's, and likely increases for higher-income employees like the ones in my sample. lipsitz2022low found that non-competes negatively affect workers by reducing their wages and job-to-job mobility, creating cause for bargaining over the agreement. Further, the emerging literature on the effects of remote work have documented WFH's role as a job amenity that is substitutable for higher income and leads to less attrition mas2017valuing, barrero2022shift, bloom2022hybrid, cullen2025home.

\paragraph{Data and Empirical Approach.} I use data from the US Census Bureau's Survey of Income and Program Participation (SIPP) for the years 2020 through 2023 to construct a panel of individual job spells for employees in Washington state. The running variable is the employee's annual salary, centered around the relevant year-specific legal threshold. The outcome of interest is the composition of an employee's WFH schedule, defined as a 6-dimensional vector representing the average proportion of time during the job spell that the employee worked 0 to 5 days from home. Since the components of this compositional vector are non-negative and sum to one, I formally test for a discontinuity by applying a square-root transformation so the vector lies on the positive orthant of a unit 5-sphere ($\mathbb{S}^5 \cap \mathbb{R}_+^6$) and adopting the geodesic metric, $d_g\left(y_1, y_2\right)=\arccos \left(y_1^{\top} y_2\right)$ bhattacharjee2023single.

figure[figure omitted — 659 chars of source]

\paragraph{Results.}

Figure (ref) depicts the evolution of employees' WFH composition during their job spell (y axis) by their annual salary (x axis), using both a binned stacked bar chart and one smoothed in a rolling window. The annual salary variable was centered around the enforceability cutoff of approximately \$100K annual income. In both panels of the figure, one can see a stark jump in the share of days worked fully remotely (light blue color) once the non-compete agreements become enforceable, while the share of time worked fully in person or partly at home diminishes. This suggests that employees, when faced with the possibility of a non-compete, used work from home as a bargaining margin during the pandemic.

figure[figure omitted — 460 chars of source]

These descriptive results are echoed in the local Fr\'echet mean estimates to the left and right of the cutoff in Figure (ref). The mean WFH composition below the cutoff has approximately 15% less time spent working fully remotely than the composition above the cutoff. Partly remote work vanishes completely, while fully in-person work diminishes by approximately 5%. The test for this difference between the two composition vectors has a p-value of 0.059, significant at the 10% level. By contrast, Table (ref) reports the coefficients of a classical local polynomial regression on each of the components of the vector separately (share of time worked 0--5 days at home, as well as whether any or all time was spent working from home). None of these coefficients are significant at the 10% level, illustrating the additional power the test can provide by exploiting the information in the compositional structure of the data. As mentioned, I do not find evidence that employees above the cutoff were more likely to work or move out of state. Furthermore, although one may expect employees to respond strategically to the cut-off point, the RD estimates do not suggest any covariate imbalance in age, gender, or education of the employees. These findings indicate that the enforceability of non-competes induced a structural shift in WFH arrangements, which served as a key bargaining margin for affected employees during the pandemic.

Preferential Tariff Loss and Countries' Input-Output Networks

\paragraph{Question.} Next, I investigate how national economies restructure in response to losing preferential trade status with the US. To that end, I exploit a unique policy event following the reauthorization of the US Generalized System of Preferences (GSP) on June 29, 2015. The GSP program, which grants duty-free access for thousands of products, had been inactive for nearly two years prior to this date. The 2015 reboot created a clear, forward-looking timeline for firms and governments: a country's GSP eligibility for the year 2017 would be determined by its Gross National Income (GNI) per capita from the year 2015.

This setup creates a regression discontinuity design for studying the effect of preferential tariffs on a country's production network. The running variable is a country's 2015 GNI per capita. The treatment is the loss of GSP benefits on January 1, 2017, for countries whose 2015 GNI crossed the high-income threshold. The question is whether this negative trade shock induced a structural change in a country's national input-output (I-O) network as export demand dropped and firms adapted their supply chains.

A potential concern is that the World Bank's high-income threshold might trigger other policies concurrently with the loss of GSP benefits. However, the most significant of these—the loss of Official Development Assistance (ODA) and graduation from the World Bank's IBRD lending—operate on longer timelines. ODA eligibility ends only after a country remains high-income for three consecutive years oecd_oda_2023, while IBRD graduation is a gradual, case-by-case process that unfolds over several years wb_ibrd_grad_2011. In contrast, US GSP status is revoked without exception on a sharp two-year trigger crs_gsp_2017. This ensures that at the point of GSP expiration, other major policy changes linked to the income threshold have not yet occurred, isolating the GSP effect.

The international trade literature has documented extensive direct and indirect links between foreign exports, tariffs, and domestic production networks baqaee2024networks, Dhyne2021Trade, AmitiKonings2007Trade. Specifically for the GSP, ozden2005perversity found that GSP graduation correlates with affected countries implementing more liberal trade policies, while hakobyan2020gsp found that GSP expiration led to sizeable declines in exports to the US of around 3%. However, to my knowledge, there exist no empirical methods to study the impact of trade shocks directly on the full structure of production networks. This underscores the usefulness of the proposed test for empirically validating predictions from trade network models and evaluating the impact of trade shocks.

\paragraph{Data and Empirical Approach.} The running variable, GNI per capita, is sourced from the World Bank Development Indicators (WDI), with the cutoff set at the official 2015 high-income threshold. The primary outcomes are domestic input-output (I-O) networks for 2016 (capturing anticipatory effects) and 2017 (capturing implementation effects), derived from the EORA26 global database lenzen2012mapping. The analysis is constrained to these years because the GSP program lapsed again at the end of 2017, and the subsequent period is further confounded by the COVID-19 pandemic. For each of the 140 countries in the final dataset, I extract the domestic I-O table from the EORA26 database lenzen2012mapping and aggregate its 26 sectors into 8 broader categories (see Table (ref)). The outcome objects for the test are the Leontief Inverse (or total requirements) matrices derived from these $8\times 8$ I-O matrices. A Leontief Inverse captures the total (direct and indirect) output from each sector required to satisfy one unit of final demand, thus representing the economy's full production multipliers.

To perform the test, I work on the space of graph Laplacians of these production networks, equipped with the Frobenius norm, which satisfies the necessary metric-space assumptions zhou2022network. For the main analysis, I symmetrize the Laplacians, though results are highly similar when using in-degree or out-degree Laplacians. Critically, because the population Fr\'echet mean of graph Laplacians under the Frobenius norm is the entrywise average of their matrix elements zhou2022network, the test directly captures changes in the country-average production multiplier network.

\paragraph{Results.}

The test indicates a statistically significant jump in the conditional Fr\'echet mean of the Leontief Inverse matrices at the GSP graduation threshold ($p=0.028$). This suggests that countries losing GSP access experience a structural change in their domestic production networks. Moreover, the test also shows a significant change in the average Leontief Inverse matrices one year before GSP graduation ($p=0.016$), further suggesting that countries already began to adjust their production networks in anticipation of the policy change. Crucially, a placebo test for 2015—a year when the GSP program was inactive—reveals no statistically significant effect ($p=0.290$), reinforcing the conclusion that the detected changes are indeed attributable to the GSP graduation event and not to other confounding policies.

Looking at the jump estimates, Figure (ref) plots the elementwise difference between the treated and control Fr\'echet means of the $8\times8$ Leontief Inverse matrices in 2017 (mapped back from the graph Laplacians). Warmer colors indicate stronger cross-sector multipliers in the treated group while cooler colors indicate weaker ones. The most striking changes appear in the resource-export chain. The effect magnitudes represent the change in total input required per dollar of final demand. The Mining-Manufacturing flows fall by 0.47 and the Mining-Trade ones by 0.36 on average, while Manufacturing's spill-overs into Construction and Trade decline by 0.26 and 0.21 respectively. These contractions indicate that, once preferential tariffs disappear, raw materials are no longer routed through domestic factories and wholesale networks for export processing.

figure[figure omitted — 426 chars of source]

A different pattern emerges on the domestic side of the economy. Construction's linkage with Public and Other Services rises by 0.11, and Mining's ties with both Construction (0.06) and Utilities (0.04) also increases slightly. The Utilities industry itself deepens its connections with Construction and the public sector (about 0.03 each). Together, these increases suggest that extraction industries redirect output towards home-market infrastructure and energy projects, while construction firms rely more heavily on government demand, likely to offset the export shortfall.

Table (ref) lists the five largest absolute decreases and increases. All major contractions involve Mining or Manufacturing on at least one end, whereas four of the five strengthened links involve Construction or Utilities. The overall heatmap in Figure (ref) is light blue along the main diagonal, implying a mild reduction in own-sector multipliers as well. Taken together, these patterns point to a sparser and less tightly coupled production network in economies that lose GSP access—an adjustment that would be invisible in most scalar outcomes such as total trade or sectoral output alone. Indeed, in Table (ref), I report the results of a standard RD analysis on scalar network outcomes such as centrality, complexity, and multiplier effects. None of these show significant changes at the GSP graduation threshold, highlighting the value of the proposed Fr\'echet jump test for capturing network-wide restructuring that would otherwise be missed.

Conclusion

This article has introduced a novel test for detecting discontinuities in conditional Fr\'echet means within general metric spaces. By leveraging local Fr\'echet regression techniques, it develops test statistics that compare the conditional Fr\'echet variances to the left and right of a potential jump location. For that, it establishes a central limit theorem for the conditional Fr\'echet variance, derived the asymptotic null distribution of the proposed test statistic, and demonstrated its consistency against relevant alternatives. Two empirical applications illustrate the utility of the test by providing novel evidence for the effect of non-competes on work from home job compositions and of preferential tariffs on developing countries' production networks.

The proposed framework is general, making it applicable to a wide range of data types where outcomes are elements of a metric space, such as distributions, networks, or spheres, that evolve nonparametrically in a scalar covariate. The test provides a formal tool for investigating abrupt changes in the central tendency of such complex data. This can be valuable in many fields, including economics, biology, and image analysis, where identifying structural breaks or treatment effects in non-Euclidean data is of increasing importance. Future research could explore finite sample performance, optimal bandwidth selection, and extensions to multivariate conditioning variables or other forms of Fr\'echet regression.