Skip to main content

mlpaneldata

Hybrid Machine-Learning / Econometric Panel-Data Library

Author: Dr Merwan Roudane — merwanroudane920@gmail.com GitHub: https://github.com/merwanroudane/mlpaneldata

mlpaneldata is a one-stop Python package for hybrid panel-data analysis that mixes classical econometrics (Pooled OLS, Fixed Effects, Random Effects, Mundlak, First Differences) with two state-of-the-art neural-network panel methodologies:

  1. Interpretable Neural Networks with Persistent Change Filters (Yang, Zheng & E, 2020 — Interpretable Neural Networks for Panel Data Analysis in Economics, arXiv:2010.05311).
  2. Deep Neural Network Panel Estimation with Common + Idiosyncratic Decomposition (Chronopoulos, Chrysikou, Kapetanios, Mitchell & Raftapostolos, 2023 — Deep Neural Network Estimation in Panel Data Models, arXiv:2305.19921).

It also implements a fully integrated hybrid estimator combining a linear panel model and a neural component on the residuals (parametric + non-parametric two-step), with a complete suite of diagnostics.

Features

  • Pre-tests — Hausman, F-test for FE, Breusch–Pagan LM (RE), Pesaran CD, Friedman, Frees, Pesaran CIPS / IPS / LLC unit-root, poolability, multicollinearity (VIF), Jarque–Bera, Wooldridge serial correlation, Breusch–Pagan / White heteroskedasticity.
  • Post-tests — RESET, residual diagnostics, Diebold–Mariano, Clark–West, encompassing, robust covariance (cluster, Driscoll–Kraay).
  • Diagnostics — partial derivatives, marginal effects, feature importance (gradient × input, permutation), heterogeneity by unit, learning curves.
  • Plots — residual / fitted, QQ, PDP / ICE, persistent-change-filter curves, training history, coefficient stability, heatmaps, forecast plots, partial-derivative time profiles, dashboard.
  • Tables — publication-quality regression tables, diagnostic tables.
  • Reports — Report object that bundles everything into Markdown / HTML.

Installation

pip install -e .

Quick start

from mlpaneldata.data    import simulate_panel
from mlpaneldata.models  import HybridPanel
from mlpaneldata.tests   import full_pretest_suite, full_posttest_suite
from mlpaneldata.plots   import diagnostic_dashboard
from mlpaneldata.tables  import regression_table

df = simulate_panel(n_units=30, n_periods=40, n_features=6, seed=0)

pre = full_pretest_suite(df, y="y", X=["x1","x2","x3","x4","x5","x6"],
                         unit="unit", time="time")
print(pre.summary())

m = HybridPanel(linear_part="within", nn_part="dnn_panel",
                hidden=[64,64], lambda_l1=1e-3, epochs=200, lr=1e-3)
m.fit(df, y="y", X=["x1","x2","x3","x4","x5","x6"],
      unit="unit", time="time")

print(regression_table([m]))
print(full_posttest_suite(m).summary())
diagnostic_dashboard(m, save="dashboard.png")

Modules

module content
mlpaneldata.data panel utilities, simulators
mlpaneldata.models.linear Pooled, FE, RE, Mundlak, First-Differences
mlpaneldata.models.filters Persistent Change Filter (paper 1)
mlpaneldata.models.inn Interpretable NN for panel data (paper 1)
mlpaneldata.models.dnn_panel Deep NN panel — common + idiosyncratic (paper 2)
mlpaneldata.models.hybrid Hybrid linear + NN estimator
mlpaneldata.tests.pretests All pre-estimation tests
mlpaneldata.tests.posttests All post-estimation tests
mlpaneldata.diagnostics Partial derivatives, importance, marginals
mlpaneldata.plots All plotting routines
mlpaneldata.tables Pretty tables
mlpaneldata.reports One-shot Markdown / HTML report

Citation

If you use this library, please cite:

Roudane, M. (2026). mlpaneldata: Hybrid ML / Econometric Panel-Data Library. https://github.com/merwanroudane/mlpaneldata

and the underlying papers (arXiv:2010.05311 and arXiv:2305.19921).

Metadata

Release files for mlpaneldata 0.1.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 mlpaneldata 0.1.0
File Size Uploaded Provenance
mlpaneldata-0.1.0.tar.gz 32.5 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 69.6 kB

Release files / mlpaneldata-0.1.0.tar.gz

Download URL mlpaneldata-0.1.0.tar.gz
Size 32.5 kB
Tags Source
SHA-256 checksum
How to use checksums
1c9197c02ca79550903f3d291fa6012cb5bb92fdc6a914076d3cf65b2b8ccef1
BLAKE2b-256 checksum
How to use checksums
deaabfd53e85c8afe4728d7bd0a641db20078c5dae9bf56843b34b45e6016b8f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.0

Release files / mlpaneldata-0.1.0-py3-none-any.whl

Download URL mlpaneldata-0.1.0-py3-none-any.whl
Size 37.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c511b973082ad933a5917b0801eb302e3fc59aed22840737d6f670c6d81d1f88
BLAKE2b-256 checksum
How to use checksums
b18fb817f8b38d0fde98ee3af7cf4f9ca0e5ef5a01901c72e2d4a55df9524e6c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.0

Security for mlpaneldata 0.1.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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

0.1.0 This release

2 release files No 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