*! version 1.0.0 29may2026

Title

qqribbon -- Per-quantile confidence-band slice of the QQR surface

Syntax

qqribbon using drawsfile , theta(#) | tau(#) [options]

where drawsfile is the long-format draws dataset from
qqr ..., bsave(drawsfile) (variables
rep tau theta beta). Exactly one of theta() / tau() must be
given.

Slice (choose one)
theta(#) fix θ at the nearest grid value; plot β against τ

tau(#) fix τ at the nearest grid value; plot β against θ

Bands
level(#) confidence level for the band (default c(level), usually 95)

joint add the wider joint (sup-t) simultaneous band

Titles & output
title(string) graph title

subtitle(string) graph subtitle

xtitle(string) x-axis title

ytitle(string) y-axis title

save(filename) export the graph

name(name) Stata graph name

scheme(name) graphics scheme

replace overwrite the exported file

Description

qqribbon takes a one-dimensional slice through the
quantile-on-quantile surface and draws it as a line with a shaded confidence
band — the familiar "coefficient with CI ribbon" plot, but for a chosen
quantile path. It answers questions the full surface makes hard to read at a
glance, such as "holding the predictor at its median (θ = 0.5), how does
the effect change across the response quantiles τ?"

Fixing theta() holds the predictor quantile and varies the response
quantile τ along the x-axis; fixing tau() does the reverse. In each
case the value you pass is snapped to the nearest point on the estimation
grid. The point estimate is the line; the shaded region is the bootstrap
confidence band.

Like qqtest and qqdiff, qqribbon reads the
joint-bootstrap draws file and never re-estimates the model.

Options

theta(#) / tau(#) choose the slice. Specify exactly one.
theta(0.5) fixes the predictor at its median quantile and plots the
effect across response quantiles; tau(0.5) fixes the response at its
median and plots the effect across predictor quantiles.

level(#) sets the confidence level of the pointwise percentile
band (default c(level), normally 95).

joint adds a second, wider band: the joint (sup-t) simultaneous
confidence band over the whole slice. The pointwise band is valid at each τ
(or θ) separately; the joint band is valid for all points on the slice
at once and is the honest band to use when making a statement about the slice
as a whole.

title(), subtitle(), xtitle(), ytitle() customise the
captions; save(), name(), scheme(), replace() control
output as usual.

Reading the plot

o The solid line is the QQR point estimate along the slice.

o The dark band is the pointwise level% bootstrap CI; the
light band (with joint) is the wider simultaneous sup-t band.

o A dashed line at zero is drawn for reference: where the band
excludes 0, the effect is significant at that quantile.

o A rising or falling line shows that the effect depends on the
quantile — the same message qqtest, test(constancy) formalises.

Examples

Effect across response quantiles, predictor held at the median

. qqr y x, tau(0.1(0.1)0.9) theta(0.1(0.1)0.9) nboot(500) bsave(draws.dta) replace

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

. title("Effect across {&tau} at {&theta}=0.5") save(rib_theta.png) replace

Effect across predictor quantiles, response held at the median

. qqribbon using draws.dta, tau(0.5) joint ///

. title("Effect across {&theta} at {&tau}=0.5") save(rib_tau.png) replace

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.

Montiel Olea, J.L. and Plagborg-Møller, M. (2019). Simultaneous
confidence bands: theory, implementation, and an application to SVARs.
Journal of Applied Econometrics 34(1):1-17.

Author

Merwan Roudane. merwanroudane920@gmail.com

See also

qqr, qqtest, qqdiff, qqheat,
qqsurf3d, qqr_package