ML / Econometric Panel-Data Library: Interpretable Neural Networks with Persistent Change Filters and Deep Neural Panel Estimation, with full pre/post tests, diagnostics, tables and plots.
Project description
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:
- Interpretable Neural Networks with Persistent Change Filters (Yang, Zheng & E, 2020 — Interpretable Neural Networks for Panel Data Analysis in Economics, arXiv:2010.05311).
- 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 —
Reportobject 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).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mlpaneldata-0.1.0.tar.gz.
File metadata
- Download URL: mlpaneldata-0.1.0.tar.gz
- Upload date:
- Size: 32.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c9197c02ca79550903f3d291fa6012cb5bb92fdc6a914076d3cf65b2b8ccef1
|
|
| MD5 |
ae2b37e1a7031989d21e0470ee087a4d
|
|
| BLAKE2b-256 |
deaabfd53e85c8afe4728d7bd0a641db20078c5dae9bf56843b34b45e6016b8f
|
File details
Details for the file mlpaneldata-0.1.0-py3-none-any.whl.
File metadata
- Download URL: mlpaneldata-0.1.0-py3-none-any.whl
- Upload date:
- Size: 37.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c511b973082ad933a5917b0801eb302e3fc59aed22840737d6f670c6d81d1f88
|
|
| MD5 |
7b54e027ba709131a30871e7db7c8895
|
|
| BLAKE2b-256 |
b18fb817f8b38d0fde98ee3af7cf4f9ca0e5ef5a01901c72e2d4a55df9524e6c
|