*! version 1.0.0 12jun2026

Title

mmqrtest distfe -- Distributional fixed-effects test,
H0: delta_i homogeneous across units

Syntax

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

Description

In MM-QR the quantile-tau fixed effect of unit i is

alpha_i(tau) = alpha_i + delta_i q(tau)

(Machado and Santos Silva 2019, eq. 6). If delta_i = delta for
every unit, the tau-variation is common to all units and individual
heterogeneity shifts all quantiles by the same unit-specific constant:
the fixed effects are pure location shifters, exactly the world of
Koenker (2004) and Canay (2011). If delta_i varies across units, the
fixed effects are distributional: time-invariant characteristics also
change dispersion and tail behavior, and location-shift estimators are
inconsistent.

Note that the relevant null is homogeneity (delta_i = delta),
not delta_i = 0: a common positive delta is required by the
scale-positivity condition whenever X'gamma can be small.

Methods and formulas

delta_i is the unit intercept of the Glejser-type scale regression of
|R_it| on X_it -- Step 3 of the MM-QR algorithm (Machado
and Santos Silva 2019, sec. 3.1; Glejser 1969). The test is therefore the
classical fixed-effects equality F statistic in that auxiliary regression:

F = [ (RSS_pooled - RSS_within) / (G-1) ] / [ RSS_within / (N-G-k) ]

comparing the pooled model (common intercept, H0) with the within model
(unit intercepts, H1), where G is the number of units and k the number of
regressors. The command also reports descriptive statistics of the
estimated delta_i, and the correlation between location effects
alpha_i and scale effects delta_i.

Caveats. |R-hat| is a generated regressand and delta_i-hat
converges at rate sqrt(T), so for very short panels the F test can
over-reject; a small-T warning is printed when average T < 10 (cf. the
O(1/T) biases in Machado and Santos Silva 2019, Theorem 4).

Options

id(panelvar), quantile(numlist) -- see mmqrtest.

graph draws a two-panel figure: a histogram of delta_i and a
scatter of delta_i against alpha_i (the "location-scale
fixed-effects map") with a fitted line.

name(string) names the combined graph (default mmqrt_distfe).

generate(stub) saves stub_alpha (alpha_i) and
stub_delta (delta_i) as new variables.

noheader suppresses the title box.

Examples

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

. mmqrtest distfe, graph generate(fe)

. histogram fe_delta

Stored results

Scalars

r(F) F statistic

r(df1) numerator df (G-1)

r(df2) denominator df (N-G-k)

r(p) p-value

r(sd_delta) standard deviation of delta_i-hat

r(corr_ad) corr(alpha_i-hat, delta_i-hat)

r(G) number of units

r(N) observations

Macros

r(verdict) REJECT or NOT REJECTED

Author

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