*! version 1.0.0 12jun2026

Title

mmqrtest scalerel -- Wald test of scale relevance,
H0: gamma = 0 (quantile-slope homogeneity)

Syntax

mmqrtest scalerel [depvar indepvars] [if] [in]
[, id(panelvar) quantile(numlist) graph
name(string) noheader]

Description

In the linear MM-QR model the quantile coefficient of regressor l is
beta_l(tau) = beta_l + q(tau) gamma_l (Machado and Santos
Silva 2019, eq. 4). Hence

H0: gamma = 0
<=>
beta(tau) identical at every tau,

i.e. the regressors do not move the scale of the conditional distribution
and quantile regression collapses to a pure location model. This is the
one test for which the paper supplies complete asymptotic theory: the
joint distribution of the scale coefficients follows from Theorem 2, and
the authors themselves report such p-values in their applications (their
fn. 30).

Implementation. After mmqreg the test is computed directly
from the scale equation of e(b)/e(V) via test,
inheriting whatever VCE was chosen at estimation (analytic, robust, or
cluster). Standalone, or after a different estimator, mmqrtest
quietly refits mmqreg, absorb(id) cluster(id)
internally (this requires mmqreg, hdfe and ftools) and
restores your estimation results afterwards.

A per-coefficient table of the scale equation with significance stars is
printed alongside the joint Wald statistic.

Interpretation. Rejection means there is genuine distributional
heterogeneity: at least one regressor changes the spread (and through
q(tau) the whole quantile path), so MM-QR adds information that mean
regression cannot deliver. Failure to reject says the quantile slopes are
statistically flat across tau.

Options

id(panelvar), quantile(numlist) -- used only when an
internal refit is needed; see mmqrtest.

graph draws a coefficient plot of the scale equation
(gamma-hat with 95% confidence intervals around a zero line).

name(string) names the graph (default mmqrt_scalerel).

noheader suppresses the title box.

Examples

. mmqreg ln_wage tenure ttl_exp, absorb(idcode) quantile(25 50 75) cluster(idcode)

. mmqrtest scalerel, graph

Standalone:

. mmqrtest scalerel ln_wage tenure ttl_exp, id(idcode)

Stored results

Scalars

r(stat) joint Wald statistic (chi-squared or F)

r(df) degrees of freedom

r(p) p-value

Macros

r(slab) statistic label, e.g. chi2(2)

r(verdict) REJECT or NOT REJECTED

Author

Merwan Roudane --
merwanroudane920@gmail.com
-- https://github.com/merwanroudane