*! version 1.0.1 20feb2026

Title

xtpqardl -- Panel Quantile Autoregressive Distributed Lag (PQARDL) estimation

Syntax

xtpqardl
depvar indepvars
[if] [in]
, tau(numlist) lr(varlist)
[options]

Required
tau(numlist) quantiles for estimation, e.g., tau(0.25 0.5 0.75)

lr(varlist) long-run level variables; first variable is the lagged dependent (ECT),
remaining are long-run regressors

Model
pmg Pooled Mean Group estimator (default)

mg Mean Group estimator

dfe Dynamic Fixed Effects estimator

p(#) autoregressive lag order for the dependent variable; default is p(1)

q(numlist) distributed lag orders; single number for all or per-variable list

lagsel(string) automatic lag selection: aic, bic, or both

pmax(#) maximum AR lag for lag selection; default is pmax(4)

qmax(#) maximum DL lag for lag selection; default is qmax(4)

Display
halflife display per-panel half-life table

srtable display per-panel ECT table

full display all per-panel tables

irf(#) number of impulse response periods to display

notable suppress coefficient tables

graph generate premium visualizations

Other
ec(name) name for ECT variable; default is ECT

replace overwrite existing ECT variable

noconstant suppress constant term

level(#) confidence level; default is level(95)

Data must be declared as panel data using xtset panelvar timevar
before calling xtpqardl.

Description

xtpqardl implements the Panel Quantile Autoregressive Distributed Lag
(PQARDL) model. This approach extends the standard panel ARDL framework of
Pesaran, Shin, and Smith (1999) to a quantile regression setting, allowing
researchers to examine how the long-run cointegrating relationship and the
short-run adjustment dynamics vary across different points of the conditional
distribution.

Traditional panel ARDL methods estimate a single set of long-run coefficients
and a single speed of adjustment, implicitly assuming homogeneity across
quantiles. The PQARDL model relaxes this assumption by estimating
quantile-dependent parameters, capturing asymmetric and distributional
heterogeneity. This is particularly valuable in empirical applications where
extreme events (e.g., large positive or negative shocks) may have different
long-run and short-run effects than moderate ones.

The methodology draws on the quantile ARDL framework developed by Cho, Shin,
and Kim (2015) and its panel extensions applied by Bildirici (2022) and
Hashmi et al. (2022). The estimation proceeds by running quantile regressions
(Koenker and Bassett, 1978) at each specified quantile for each panel, then
aggregating panel-specific estimates using the Pooled Mean Group (PMG), Mean
Group (MG), or Dynamic Fixed Effects (DFE) approach.

Model

Consider a panel of N cross-sectional units observed over T time periods.
The PQARDL(p, q_1, ..., q_k) model is specified as:

Q_(Delta y_ | X_) = rho(tau) * y_ + beta(tau)' * X_
+ sum_^

phi_j(tau) * Delta y_
+ sum_^ theta_m(tau) * Delta x_ + alpha_i(tau)

where:

rho(tau) is the quantile-dependent speed of adjustment toward long-run equilibrium.
A negative and significant rho(tau) confirms cointegration at quantile tau.

beta(tau) is the vector of long-run cointegrating coefficients at quantile tau,
computed as -coef(x_j) / rho(tau) for each regressor j.

phi_j(tau) are the short-run autoregressive dynamics at quantile tau.

theta_m(tau) are the short-run distributed lag impact coefficients at quantile tau.

alpha_i(tau) are quantile-dependent panel fixed effects.

PMG Estimation:
Under PMG, long-run slope coefficients beta(tau) are constrained to be
homogeneous across panels, while short-run coefficients and the speed of
adjustment are allowed to vary. Mean Group estimates are reported as simple
cross-sectional averages of the panel-specific quantile regression estimates,
with standard errors computed using the Pesaran and Smith (1995) non-parametric
variance formula: V = (1/N(N-1)) * sum(b_i - b_bar)(b_i - b_bar)'.

Wald Tests:
The command reports Wald tests for the null hypothesis that parameters are
constant across quantiles (H0: parameter(tau_i) = parameter(tau_j) for all
i != j). Rejection provides evidence of quantile heterogeneity, indicating
that the relationship varies across the conditional distribution.

Options

Required

tau(numlist) specifies the quantiles at which estimation is performed.
Values must be between 0 and 1 exclusive.
Example: tau(0.1 0.25 0.5 0.75 0.9) for five quantiles.

lr(varlist) specifies the long-run level variables. The first variable
must be the lagged dependent variable (e.g., L.y or a pre-computed lag),
which identifies the error correction term. Remaining variables are the
long-run regressors whose cointegrating coefficients beta(tau) are
estimated.

Model

pmg specifies the Pooled Mean Group estimator. This is the default.

mg specifies the Mean Group estimator.

dfe specifies the Dynamic Fixed Effects estimator.

p(#) specifies the autoregressive lag order. The default is 1.
When p > 1, additional lagged differences of the dependent variable
(D.L1.depvar, D.L2.depvar, ...) are included in the short-run equation.

q(numlist) specifies the distributed lag order(s) for the independent
variables. A single number applies to all variables. A list specifies
per-variable orders. Example: q(2 3) for PQARDL(p, 2, 3) with two
independent variables having 2 and 3 distributed lags respectively.

lagsel(string) activates BIC-based automatic lag selection.
Searches over p = 1,...,pmax and q = 1,...,qmax. Displays a BIC grid
and selects the optimal PQARDL(p, q1, ..., qk) specification.

Display

halflife displays a per-panel half-life table. Half-life is
defined as HL(tau) = ln(2)/|rho(tau)| and indicates the number of
periods needed to close 50% of a disequilibrium at quantile tau.

srtable displays the per-panel speed of adjustment table,
showing rho_i(tau) for each panel i and quantile tau.

full equivalent to specifying both halflife and srtable.

irf(#) displays an impulse response function table showing the
response to a unit shock over # periods at each quantile.

graph generates premium visualizations including:
quantile process plots with 95% CI bands,
ECT heatmap across panels and quantiles,
half-life bar chart,
long-run coefficient comparison,
impulse response fan chart, and
persistence profile.

Other

ec(name) specifies the name for the error correction term.
Default is ECT.

noconstant suppresses the constant term in the quantile regressions.

Examples

Setup: generate simulated panel data

. xtpqardl_makedata, n(10) t(50) seed(12345) clear

Example 1: Basic PMG estimation at 3 quantiles

. xtpqardl dy dx1 dx2, lr(ly x1 x2) tau(0.25 0.5 0.75) pmg

Example 2: 5 quantiles with half-life table

. xtpqardl dy dx1 dx2, lr(ly x1 x2) tau(0.1 0.25 0.5 0.75 0.9) pmg halflife

Example 3: Heterogeneous lag orders PQARDL(2, 2, 3)

. xtpqardl dy dx1 dx2, lr(ly x1 x2) tau(0.25 0.5 0.75) p(2) q(2 3) pmg

Example 4: Automatic BIC lag selection

. xtpqardl dy dx1 dx2, lr(ly x1 x2) tau(0.25 0.5 0.75) lagsel(bic) pmg

Example 5: Full analysis with graphs and IRF

. xtpqardl dy dx1 dx2, lr(ly x1 x2) tau(0.1 0.25 0.5 0.75 0.9) pmg halflife irf(15) graph full

Example 6: Post-estimation access

. matrix list e(beta_mg)

. matrix list e(rho_mg)

. matrix list e(rho_all)

Stored results

xtpqardl stores the following in e():

Scalars

e(N) number of observations

e(n_g) number of panels

e(valid_panels) number of panels successfully estimated

e(p) AR lag order

e(k) number of short-run independent variables

e(k_lr) number of long-run regressors (excluding lagged y)

e(ntau) number of quantiles

Macros

e(cmd) xtpqardl

e(model) estimation model: pmg, mg, or dfe

e(ardl_order) ARDL order string, e.g., PQARDL(1,2,3)

e(depvar) name of dependent variable

e(indepvars) names of short-run independent variables

e(lrvars) names of long-run regressor variables

e(lr_y) name of lagged dependent variable (ECT)

e(qlags) distributed lag orders per variable

Matrices

e(beta_mg) mean group long-run coefficients beta(tau)

e(beta_V) variance-covariance matrix of beta_mg

e(rho_mg) mean group ECT speed of adjustment rho(tau)

e(rho_V) variance-covariance matrix of rho_mg

e(halflife_mg) mean group half-life by quantile

e(phi_mg) mean group AR lag coefficients

e(sr_mg) mean group short-run impact coefficients

e(beta_all) panel-specific long-run beta (N x k*ntau)

e(rho_all) panel-specific ECT coefficient (N x ntau)

e(halflife_all) panel-specific half-life (N x ntau)

References

Cho, J.S., Kim, T., and Shin, Y. (2015).
Quantile cointegration in the autoregressive distributed-lag modeling framework.
Journal of Econometrics, 188(1), 281-300.

Bildirici, M.E. (2022).
Refugee population, governance, and sustainable environment: Evidence from panel quantile autoregressive distributed lag model.
Environment, Development and Sustainability, 24, 12653-12678.

Hashmi, S.M., Chang, B.H., Huang, L., and Uche, E. (2022).
Revisiting the relationship between oil prices, exchange rate, and stock prices: An application of quantile ARDL model.
Resources Policy, 75, 102543.

Pesaran, M.H., Shin, Y., and Smith, R.P. (1999).
Pooled mean group estimation of dynamic heterogeneous panels.
Journal of the American Statistical Association, 94(446), 621-634.

Pesaran, M.H. and Smith, R.P. (1995).
Estimating long-run relationships from dynamic heterogeneous panels.
Journal of Econometrics, 68(1), 79-113.

Koenker, R. and Bassett, G. (1978).
Regression quantiles.
Econometrica, 46(1), 33-50.

Requirements

Stata 15.1 or later.

The xtpmg package (version 2.0.1 or later) is required for complementary
panel ARDL analysis. Install via:

. ssc install xtpmg

Author

Dr Merwan Roudane

Email: merwanroudane920@gmail.com

Please cite this package as:

Roudane, M. (2026). XTPQARDL: Stata module for Panel Quantile ARDL estimation.