Papers
Topics
Authors
Recent
2000 character limit reached

Scaled MAD Global Envelope Test

Updated 19 December 2025
  • Scaled MAD GET is a non-parametric, simulation-based methodology that uses the maximum absolute deviation with pointwise scaling to assess global hypotheses in multivariate and functional data.
  • The test produces a graphical envelope that highlights regions of significant deviation, offering both rigorous family-wise error control and clear visual diagnostics.
  • It is widely applicable in spatial statistics, image analysis, and permutation-based inference, underpinned by robust computational techniques and simulation approaches.

The Scaled Maximum Absolute Difference (MAD) Global Envelope Test (GET) is a non-parametric, simulation-based hypothesis testing framework for multivariate or functional data. It enables simultaneous global inference for an entire vector or curve by comparing an observed function or test-statistic vector to an ensemble of replicates simulated under a null reference model. By scaling the maximum absolute deviation pointwise, the procedure accommodates heteroskedasticity and spatiotemporal dependence, and provides both a global p-value with rigorous family-wise error control and a graphical envelope indicating the regions of significant deviation. The test has wide applicability in spatial statistics, image analysis, non-parametric function comparison, and permutation-based inference for general linear models (Myllymäki et al., 2013, Myllymäki et al., 2019, Mrkvicka et al., 2019, Tivenan et al., 17 Dec 2025).

1. Formal Hypothesis Framework

The core object is a set of multivariate or functional test-statistic vectors {Ti}\{T_i\}, each of length dd (or functions evaluated on a grid). The test addresses the global hypothesis: H0:Tobs=DT,for all k=1,,d,H_0: T_\text{obs} \stackrel{\mathcal{D}}{=} T, \quad \text{for all } k=1,\ldots,d, where TobsT_\text{obs} is the observed data vector or curve and TT is a null-distribution sample (e.g., from a fitted model, permutation, or parametric bootstrap). The alternative is that there is at least one kk where this equality fails.

There are two common scenarios:

  • Simple null: All TiT_i are generated under a specified H0H_0 distribution.
  • Composite null: Plug-in parameter estimates are used both for the observed and simulated curves, ensuring exchangeability.

For regime comparison, e.g., in spatial boundary change detection, Tobs(x)=y^(A)(x)y^(B)(x)T_\text{obs}(x) = \hat{y}^{(A)}(x) - \hat{y}^{(B)}(x) can represent a difference of predicted functions from separate periods (Tivenan et al., 17 Dec 2025).

2. Scaled MAD Statistic and Envelope Construction

The procedure centers on the "maximum absolute deviation" (MAD), a reduction of each vector or function to a single number, and its scaled variants (Myllymäki et al., 2013, Myllymäki et al., 2019, Tivenan et al., 17 Dec 2025). The general scaled MAD statistic is: Mi=maxk=1,,dTikT0ksk,M_i = \max_{k=1,\ldots,d} \frac{|T_{ik} - T_{0k}|}{s_k}, where T0kT_{0k} is the pointwise center (often the Monte Carlo mean) and sks_k is the local scale, which can be chosen according to three main options:

Scaling Type Scale Factor sks_k R Package Type
Unscaled $1$ "unscaled"
Studentized Monte Carlo standard deviation σk\sigma_k "st"
Directional-quantile QkT0k|\overline{Q}_k - T_{0k}| or T0kQk|T_{0k} - \underline{Q}_k| "qdir"
  • Studentized scaling: sk=Var(Tik)s_k = \sqrt{\text{Var}(T_{ik})}, robust against nonconstant variance.
  • Directional-quantile scaling: sks_k is the upper or lower Monte Carlo quantile distance, capturing skew or tail behavior.
  • Unscaled: rarely recommended, as it fails when variability is not constant (Myllymäki et al., 2019).

After computing the MAD for all ss replicates, the critical value cαc_\alpha is the (1α)(1-\alpha)-quantile of {Mi}\{M_i\}. The global envelope at each kk is: [T0kcαsk, T0k+cαsk],\left[T_{0k} - c_\alpha s_k,\ T_{0k} + c_\alpha s_k\right], with modifications for directional-quantile scaling.

3. Monte Carlo Test and Family-Wise Error Rate Control

The test implements a Monte Carlo hypothesis test based on the exchangeability of the observed M1M_1 and simulated MiM_i under H0H_0 (Myllymäki et al., 2013, Myllymäki et al., 2019, Mrkvicka et al., 2019):

  • Compute the MAD statistic M1M_1 for the data and {Mi}i=2s\{M_i\}_{i=2}^s for the nulls.
  • Compute the (Monte Carlo) p-value:

p=1s#{i:MiM1}p = \frac{1}{s} \#\left\{i : M_i \ge M_1 \right\}

  • Reject H0H_0 at level α\alpha if p<αp < \alpha, or equivalently, if M1>cαM_1 > c_\alpha.
  • The procedure controls the (simultaneous) family-wise error rate (FWER) exactly at α\alpha, even for highly dependent or heteroskedastic statistics.

For permutation-GLM applications, indexing follows the same pattern with JJ permutations; the critical MAD value QQ is selected as the (1α)(1-\alpha)-quantile among J+1J+1 exchangeable MiM_i (Mrkvicka et al., 2019).

4. Graphical Envelope and Intrinsic Graphical Interpretation

A distinctive feature of the scaled MAD GET is the intrinsic graphical interpretation (IGI) property (Myllymäki et al., 2019): the observed vector or function crosses the global envelope at a location kk if and only if the global test rejects at level α\alpha. The envelope band is thus both a confidence region and a visual diagnostic highlighting the precise locations contributing to overall significance.

This graphical property means one can:

  • Identify which regions or coordinates drive rejection.
  • Visualize departures in multivariate, functional, or spatial settings (e.g., distances, spatial coordinates, time-points).

5. Algorithmic and Computational Considerations

The practical implementation follows:

  1. Simulate ss null replicates T2,,TsT_2,\dots,T_s.
  2. Calculate pointwise mean T0kT_{0k} and scale sks_k.
  3. For each ii, compute MiM_i.
  4. Sort {Mi}\{M_i\}; set cαc_\alpha as the (1α)(1-\alpha) quantile.
  5. Construct the envelope [T0kcαsk, T0k+cαsk]\left[T_{0k}-c_\alpha s_k,\ T_{0k}+c_\alpha s_k\right].
  6. Evaluate p-value; plot data vs. envelope for interpretation.

Key computational properties:

  • Number of replicates: hundreds to thousands needed for stable quantiles, especially with α0.05\alpha \ll 0.05.
  • For high-dimensional data (e.g., imaging), running-sums and in-place accumulation enable large-scale application.
  • Each replicate's computational cost is dominated by simulation or permutation steps; envelope construction is O(sd)O(sd) (Mrkvicka et al., 2019).
  • The approach is implemented and optimized in the R package GET, as detailed in (Myllymäki et al., 2019).

6. Applications and Extensions

Scaled MAD GETs have been used in:

  • Spatial statistics: Goodness-of-fit for summary functions (Ripley's KK, LL, JJ), comparing spatial boundaries (Myllymäki et al., 2013, Tivenan et al., 17 Dec 2025).
  • Boundary change detection: Quantifying and testing the significance of shifts in estimated spatial boundaries under Gaussian process models (Tivenan et al., 17 Dec 2025).
  • Permutation-GLM and neuroimaging: Familywise error-corrected inference for functional regressors or contrasts at all voxels or nodes (Mrkvicka et al., 2019).
  • General functional data analysis: Non-parametric ANOVA, confidence region construction, regression central regions (Myllymäki et al., 2019).

A representative workflow is implemented in GET:

1
2
3
4
5
library(GET)
cset <- curve_set(r=grid, obs=T1, sim=matrix)
res <- global_envelope_test(cset, type="st", alpha=0.05, alternative="two.sided")
print(res$pvalue)
plot(res) # IGI band + data curve highlighted

7. Theoretical and Practical Considerations

Essential validity conditions include:

  • Exchangeability: Replicates and observed values must be exchangeable under H0H_0, satisfied by permutation or parametric simulation strategies.
  • Scale-robustness: Studentized or quantile-based scaling protects against inhomogeneity in variance, skew, or high-dimensional dependence.
  • Bandwidth/interval choice: The envelope protects over the entire grid or region of interest; choice of this region should reflect all plausible departures (Myllymäki et al., 2013).
  • Computational efficiency: For large dd, per-location accumulation significantly reduces memory demands; in one-dimensional domains, Cholesky or state-space GP simulation enables rapid null curve generation (Tivenan et al., 17 Dec 2025).
  • Interpretation: IGI ensures that graphical envelope crossings correspond exactly to statistical rejection.

Common pitfalls include:

  • Unscaled MAD tests under heteroskedasticity.
  • Insufficient replicates for high-precision p-values at small α\alpha.
  • Failure to use the same estimator or processing pipeline for both observed and null replicates.

The scaled MAD GET offers a unified framework for global, interpretable, and robust hypothesis testing in high-dimensional, functional, or spatial contexts, with rigorous error control and strong interpretability (Myllymäki et al., 2013, Myllymäki et al., 2019, Mrkvicka et al., 2019, Tivenan et al., 17 Dec 2025).

Whiteboard

Follow Topic

Get notified by email when new papers are published related to Scaled Maximum Absolute Difference (MAD) Global Envelope Test (GET).