*! version 1.0.1 27may2026

Title

dnqrlib -- Network Quantile Autoregression and Dynamic Network Quantile Regression

Overview

The dnqr package provides Stata implementations of two complementary
network quantile time-series models:

1. Network Quantile Autoregression (NQAR) of
Zhu, Wang, Wang and Härdle (2019). Only lagged network spillovers
enter the conditional quantile, so the model is estimated by plain
quantile regression. See nqar.

2. Dynamic Network Quantile Regression (DNQR) of
Xu, Wang, Shin and Zheng (2024). The model adds a contemporaneous
network mean Gamma1(tau) WYt, which is endogenous and
estimated by Chernozhukov-Hansen instrumental variable quantile regression
(IVQR) via a one-dimensional grid search. See dnqr.

Both estimators accept a row-standardised N x N adjacency matrix W
passed as a Stata or Mata matrix, optional time-invariant nodal covariates
Z, and optional common factors F with lags. Standard errors are
Powell (1986) sandwich with Hall-Sheather or Bofinger bandwidth following
Koenker and Xiao (2006), so no bootstrap is required. The full package
runs in Stata 13 and above and depends only on built-in qreg
(no Stata 18+ ivqregress required).

Commands in this package

nqar Network Quantile Autoregression (Zhu et al. 2019)

dnqr Dynamic Network Quantile Regression (Xu et al. 2024)

dnqr_plot Plot quantile coefficient processes with CI bands

dnqr_impulse Tail-event impulse-response analysis

dnqr_simulate Monte Carlo data simulator

dnqr_postestimation All post-estimation tools

Typical workflow

. * 1. simulate a panel and a network

. dnqr_simulate, n(80) t(60) gamma1(0.25) gamma2(0.20) gamma3(0.30) z(2) factors(2) clear wname(W)

. * 2. fit the NQAR baseline (no contemporaneous term)

. nqar y, network(W) quantile(0.1 0.25 0.5 0.75 0.9) z(Z1 Z2) factors(F1 F2) rowstd

. * 3. fit the full DNQR with contemporaneous network endogeneity

. dnqr y, network(W) quantile(0.1 0.25 0.5 0.75 0.9) z(Z1 Z2) factors(F1 F2) rowstd ivtype(wy23)

. * 4. plot the quantile process

. dnqr_plot WY WY_L1 Y_L1

. * 5. tail-event impulse response at tau = 0.9

. dnqr_impulse, network(W) rowstd horizon(10) quantile(0.9) shocknode(1) plot

References

Chernozhukov, V., and C. Hansen. 2006. Instrumental quantile regression
inference for structural and treatment effect models. Journal of
Econometrics 132: 491-525.

Koenker, R., and Z. Xiao. 2006. Quantile autoregression. Journal of
the American Statistical Association 101: 980-990.

Powell, J. L. 1986. Censored regression quantiles. Journal of
Econometrics 32: 143-155.

Xu, X., W. Wang, Y. Shin, and C. Zheng. 2024. Dynamic Network
Quantile Regression Model. SSRN Working Paper 3690631.

Zhu, X., W. Wang, H. Wang, and W. K. Härdle. 2019. Network quantile
autoregression. Journal of Econometrics 212(1): 345-358.

Author

Dr Merwan Roudane

Email: merwanroudane920@gmail.com

Version: 1.0.0, 27 May 2026

The package is distributed as is, without warranty. Bug reports and
suggestions for new features are welcome at the email above.