Skip to main content

ardlflex for Python

Flexible Unified Time-Series, Panel, Nonlinear, IV, and Spatial ARDL Econometrics

Features

  • Unified Time-Series & Panel Engine: OLS, Dynamic Fixed Effects (dfe), Pooled Mean Group (pmg), and Cross-Sectional Averages (csardl).
  • Lag-Elasticity Shrinkage: Coordinate-descent Elastic Net with lag-decay adaptive weights and automatic EBIC tuning (autopen=True).
  • Break- & Gap-Aware Estimation: Explicit or automatic Sup-Wald break detection (breaks="auto", breakslope=True) and safe gap handling (gapmode="skip"|"regime"|"interpolate").
  • Nonlinear & Quantile ARDL: 2-regime NARDL (asymmetric), Multi-Threshold Quantile-Decomposed ARDL (qdecomp, nq, qcuts), automatic individual-regime AIC/BIC lag selection (lagselect), Quantile ARDL (quantile), Kernel TVP-ARDL (tvp=True), and AICc Model Averaging (aicavg=True).
  • Panel IV & Spatial Panel ARDL: 2SLS and Post-Lasso IV (endog, iv, ivlags, endog_ldv, ivmethod="2sls"|"lasso") with First-Stage F, Wu–Hausman, and Hansen J; Dynamic Spatial SLX, SAR, and SDM (wmat, spatial="slx"|"sar"|"sdm") with automatic Kelejian–Prucha spatial IVs ($WX, W^2X, W^3X$) and Panel Moran's $I$.
  • Exact ECM & Combined Effects: Long-run equilibrium multipliers, exact ECM short-run coefficients (LD.y, D.x, LD.x), and combined_effects() reporting all 3 econometric standards (Joint Wald $\chi^2$, Net Sum, 1-SD Standardized / custom weights).
  • Forecasting, Counterfactuals & Policy Engines: Dynamic multi-step forecasts (analytic, bootstrap, conformal CIs), policy shocks & nobreak counterfactuals, Rebound/Jevons (rebound_effect), Direct/Indirect Spillover (spillover_effect), Replacement/Displacement MDR (displace_effect), publication graphics (aer, nature, econometrica, bw), and LaTeX/Markdown/CSV/HTML table export.

Installation

pip install ardlflex

Or directly from the project hub:

pip install https://ardlflex.vercel.app/dist/ardlflex-1.0.0-py3-none-any.whl

Citation

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

Quick Start

import pandas as pd
from ardlflex import ARDLFlex, combined_effects, forecast, counterfactual, export_table

model = ARDLFlex(
    depvar="y",
    indepvars=["x1", "x2"],
    timevar="t",
    lags=2,
    alags=2,
    vce="hac",
)
res = model.fit(df)
print(res.summary())

# Combined LR/SR/Impact effects (all 3 standards)
comb = combined_effects(res, vars=["x1", "x2"])
print(comb["table"])

# Dynamic forecast with distribution-free conformal bands
fc = forecast(res, steps=8, exog="drift", ci_method="conformal")

Metadata

Release files for ardlflex 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ardlflex 1.0.0
File Size Uploaded Provenance Actions
ardlflex-1.0.0.tar.gz 48.0 kB With provenance Details for ardlflex-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ardlflex 1.0.0
File Interpreter ABI Platform Actions
ardlflex-1.0.0-py3-none-any.whl Python 3 none any Details for ardlflex-1.0.0-py3-none-any.whl

Total release size: 94.0 kB

Release files / ardlflex-1.0.0.tar.gz

Download URL ardlflex-1.0.0.tar.gz
Size 48.0 kB
Tags Source
SHA-256 checksum
How to use checksums
85f614e54a71fbeabbd47a756956862f4084ea5819e705acffd90e253f091dba
BLAKE2b-256 checksum
How to use checksums
9002347edcf0bc20bcd4f5e061690a947c29d3e0eae894f89776ec00177c8d33
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 6, 2026.

Transparency log

Release files / ardlflex-1.0.0-py3-none-any.whl

Download URL ardlflex-1.0.0-py3-none-any.whl
Size 46.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
310c31e5c9fd8e2ac5513e5c3897a7f11ef6216ed2716702ecc7bef8c6010ba3
BLAKE2b-256 checksum
How to use checksums
2705a27850f77c32b561ccee76658c2ed6563ce18a45c5ee3fd9a05f4d46dfda
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 6, 2026.

Transparency log

Security for ardlflex 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ardlflex-1.0.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 6, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page