Stata 16+ / Mata • Python 3.9+ • R 4.x • Full Parity Suite

Unified Time-Series, Panel & Spatial ARDL Across Stata, Python & R

Estimate regularized, break- and gap-aware, quantile-decomposed nonlinear, instrumental-variable, and dynamic spatial panel ARDL models — with conformal forecasting, policy counterfactuals, rebound/spillover/displacement engines, and journal-ready graphics in your preferred language.

ssc install ardlflex, replace
mata: mata mlib index
ardlflex_demo
3
Native Ecosystems: Stata (Mata), Python (NumPy/SciPy), & Base R
33/33
Verified Unit Test Suites Passing (11 Stata + 11 Python + 11 R)
16+
Publication Figure Types (Forest, Group, RCP2.6–8.5) + 5 Themes
4
Classic Published Benchmarks Replicated to 4 Decimal Places

One Econometric Engine, Three Languages

Exact methodological parity across Stata, Python, and R — same Elastic-Net EBIC tuning, gap-safe lag builder, Kelejian–Prucha spatial IVs, 3-standard combined effects, and conformal forecast bands.

Stata 16+ / Mata

ardlflex for Stata

40 compiled Mata functions (lardlflex.mlib), full tsset/xtset integration, estat post-estimation suite, GUI dialog (db ardlflex), SMCL help files, and one-line net install directly from this hub.

Python 3.9+

ardlflex for Python

Clean object-oriented ARDLFlex & ARDLFlexResult API built on NumPy, SciPy, Pandas, and Matplotlib. Full support for DataFrame workflows, journal-themed figures, and LaTeX/HTML/Markdown/CSV export.

R 4.x (Zero External Deps)

ardlflex for R

CRAN-ready S3 package (ardlflex(), summary(), predict()) built purely on base R + stats/graphics/grDevices — zero fragile dependencies, installs cleanly on any R 4.x system.

What Makes ardlflex One-of-a-Kind

Engineered from first principles to solve real-world econometric bottlenecks that conventional ARDL packages leave to manual workarounds.

Regularization

Lag-Elasticity Shrinkage

Coordinate-descent Elastic Net with lag-decay adaptive weighting and EBIC auto-tuning (autopen) prevents lag overfitting while preserving unbiased long-run multipliers.

Nonlinearity

Quantile Partial Sums & Symmetry

Decompose regressors into quartiles, quintiles, deciles, or custom cutpoints (qdecomp), with individual AIC/BIC lags and joint/pairwise LR & SR symmetry tests + ratios.

Panel & Spatial

DFE, PMG, CS-ARDL & Spatial SDM

Unified panel engine supporting Dynamic Fixed Effects, Pooled Mean Group, Cross-Sectional Averages, and Spatial SLX/SAR/SDM with automatic Kelejian–Prucha IVs & Moran's I.

Endogeneity

Panel IV & Post-Lasso First Stage

Seamless external (iv) and gap-safe internal lagged instruments (ivlags) with Post-Lasso instrument selection (ivmethod="lasso"), First-Stage F, Wu–Hausman, and Hansen J.

Forecasting & IPCC RCPs

Conformal Fan-Charts & RCP2.6–RCP8.5

Dynamic forecasts with analytic, bootstrap, or conformal intervals — plus built-in standardized IPCC RCP2.6, RCP4.5, RCP6.0 & RCP8.5 pathways up to 2100 (standalone or extended from observed history).

Policy & Decoupling

Decomposition, Tapio Decoupling & Policy AUC

Exact covariance variance decomposition (decompose), 8-state Tapio (2005) decoupling/coupling (decouple), cumulative policy AUC (policy), plus Rebound, Spillover, and MDR modules.

Causal & OVB Audit

Reverse Causality, Oster δ* & HNMS Causality

Bidirectional Reverse Causality Ratio (RCR), Oster (2019) OVB breakdown δ* (endog_audit), and Hybrid Nonlinear/Multi-Horizon/ECM Omnibus Causality (flex_causality) via Cauchy combination.

Pre-NARDL & Forest Plots

Large-Shock Screening & Dot-Whisker Graphics

Screen heavy tails & asymmetry before NARDL/QARDL (shock_screen), and generate modern 90%/95% Dot-Whisker Forest plots (plot_coef) and named Panel Group-Comparison plots (plot_groups).

Interactive Multi-Language Command Builder

Configure your econometric specification below and toggle between Stata, Python, and R to generate ready-to-run estimation, diagnostics, forecasting, and publication export code.


        

5-Minute Applied Case Studies

Copy-paste workflows for high-impact empirical research in energy, macroeconomics, and regional economics — switch seamlessly between Stata, Python, and R.

Stata Workflow

    

Author & Citation

Developed by Samuel Asumadu Sarkodie, Ph.D., Ph.D. (Independent Researcher • asumadusarkodiesamuel@yahoo.com • ORCID: 0000-0001-5035-5983 • Zenodo DOI: 10.5281/zenodo.24721184).

BibTeX
@software{sarkodie2026ardlflex,
  author  = {Sarkodie, Samuel Asumadu},
  title   = {ardlflex: A Unified Cross-Language Suite for Regularized, Nonlinear, Instrumental-Variable, and Spatial ARDL Econometrics},
  version = {1.0.0},
  year    = {2026},
  publisher = {Zenodo},
  doi     = {10.5281/zenodo.24721184},
  url     = {https://doi.org/10.5281/zenodo.24721184}
}
APA 7th Edition
Sarkodie, S. A. (2026). ardlflex: A Unified Cross-Language Suite for Regularized, Nonlinear, Instrumental-Variable, and Spatial ARDL Econometrics (Version 1.0.0) [Computer software]. Zenodo. https://doi.org/10.5281/zenodo.24721184