*! version 1.1.0 29may2026

qqr package

-- Quantile-on-Quantile methods for Stata

Author: Merwan Roudane (merwanroudane920@gmail.com)

Version: 1.1.0

Depends: krls (SSC, for qqkrls), moremata (SSC, optional)

Description

The qqr package implements four families of quantile-on-quantile (QQ)
estimators, a suite of MATLAB-style visualisations, publication-ready tables,
and a formal joint-bootstrap inference toolkit for the estimated surface
β(τ,θ). Click any command below to open its detailed help.

Estimation commands

qqr qqr y x — bivariate QQ regression (Sim & Zhou 2015)

mqqr mqqr y x1 x2 ... — multivariate QQ regression

qqgcause qqgcause y x — nonparametric quantile causality (Balcilar et al.)

qqkrls qqkrls y x — QQ kernel regularised least squares (Adebayo et al.)

Visualisation commands

qqheat qqheat using ... — MATLAB-style contour heatmap (jet / parula / viridis ...)

qqsurf qqsurf using ... — lightweight pseudo-3D scatter surface

qqsurf3d qqsurf3d using ... — filled MATLAB-surf-style 3D surface

qqcauseplot qqcauseplot using ... — quantile-causality test plot

qqtable qqtable using ... — formatted console / LaTeX table

Inference & diagnostics

These read the joint-bootstrap draws file written by
qqr ..., bsave(draws.dta) and turn the QQR picture
into formal statements.

qqtest qqtest using ... — KS / Cramér–von Mises / Wald tests (zero, symmetry, constancy)

qqribbon qqribbon using ... — per-quantile CI-band slice of the surface

qqdiff qqdiff using ... — asymmetry / difference-of-surfaces starred heatmap

Typical workflow

1. Estimate and visualise

. qqr y x, saving(qq.dta) replace

. qqheat using qq.dta, value(coef) colormap(jet) sigmark

. qqsurf3d using qq.dta, value(coef) colormap(jet)

. qqtable using qq.dta, value(coef) stars latex(out.tex)

2. Joint-bootstrap inference

. qqr y x, nboot(500) bci bsave(draws.dta) saving(qq.dta) replace

. qqtest using draws.dta, test(zero)

. qqtest using draws.dta, test(symmetry)

. qqribbon using draws.dta, theta(0.5) joint

. qqdiff using draws.dta

A complete, runnable demonstration is provided in qqr_demo.do.

Installation

From the SSC archive:

. ssc install qqr

. ssc install krls // only needed for qqkrls

Dependencies. The estimation, table, heatmap (qqheat) and
3D-surface (qqsurf, qqsurf3d) commands need nothing beyond
base Stata 14+ — all graphics use built-in twoway
(contour/scatter/pci) and all MATLAB-style colormaps are
generated internally (no heatplot, colorpalette, palettes,
colrspace or grstyle required). The only external dependency
is krls (SSC), used solely by qqkrls. moremata
(SSC) is optional.

References

Sim, N. and Zhou, H. (2015). Oil prices, US stock return, and the
dependence between their quantiles. Journal of Banking & Finance 55:1-12.

Balcilar, M., Gupta, R. and Pierdzioch, C. (2016). Does uncertainty move
the gold price? Resources Policy 49:74-80.

Jeong, K., Härdle, W.K. and Song, S. (2012). A consistent nonparametric
test for causality in quantile. Econometric Theory 28(4):861-887.

Adebayo, T.S., Ozkan, O. and Eweade, B.S. (2024). Do energy efficiency
R&D investments and ICT promote environmental sustainability in Sweden? A
QQKRLS investigation. Journal of Cleaner Production 440:140832.

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

Author

Merwan Roudane. merwanroudane920@gmail.com