*! version 1.0.0 16may2026

Title

qqkrls -- Quantile-on-Quantile Kernel Regularised Least Squares

Syntax

qqkrls depvar indepvar [if] [in] [, options]

tau(numlist) τ grid (default 0.05(0.05)0.95)

theta(numlist) θ grid (default 0.05(0.05)0.95)

minobs(#) min observations per θ-subset (default 20)

nboot(#) bootstrap replications for SE (default 100)

sigma(#) KRLS bandwidth (default: krls auto)

lambda(#) KRLS regularisation (default: LOO-CV)

saving(filename) save long-format results .dta

replace overwrite existing file

noprogress suppress progress

Description

Implements Quantile-on-Quantile KRLS from Adebayo et al. (2024).
For each θ the data are subset to x ≤ x_θ. A KRLS model is fit on the
subset, producing one pointwise marginal effect dy/dx per observation. The
QQ coefficient β(τ,θ) is then the τ-quantile of these pointwise effects.
Standard errors are obtained by bootstrapping the τ-quantile.

This command wraps the krls command (Hainmueller & Hazlett, SSC).

Saved dataset format

Columns: tau theta coef se t p n_sub.

Example

. qqkrls co2 gdp, tau(0.1(0.1)0.9) theta(0.1(0.1)0.9) saving(qk.dta) replace

. qqheat using qk.dta, value(coef) colormap(plasma) sigmark

References

Adebayo, T.S., Ozkan, O. and Eweade, B.S. (2024).
Journal of Cleaner Production 440:140832.

Hainmueller, J. and Hazlett, C. (2014).
Political Analysis 22:143-168.

See also

krls, qqr