Home
The complete Python toolkit for panel data econometrics.
70+ econometric models | 50+ diagnostic tests | Interactive HTML reports | Google Colab tutorials
Quick Start¶
from panelbox.experiment import PanelExperiment
exp = PanelExperiment(data, "invest ~ value + capital", "firm", "year")
exp.fit_all_models(["pooled", "fe", "re"])
validation = exp.validate_model("fe") # 15+ automatic tests
comparison = exp.compare_models(["pooled", "fe", "re"])
exp.save_master_report("analysis.html") # Interactive HTML report
What's Inside¶
-
Static Models
Pooled OLS, Fixed Effects, Random Effects, Between, First Difference
-
Dynamic GMM
Arellano-Bond, Blundell-Bond, CUE-GMM, Bias-Corrected
-
Spatial Econometrics
SAR, SEM, SDM, Dynamic Spatial, General Nesting Spatial
-
Stochastic Frontier
Production/Cost frontiers, Four-Component (unique in Python), TFP
-
Quantile Regression
Pooled, FE, Canay Two-Step, Location-Scale, Dynamic, Treatment Effects
-
Panel VAR
VAR, VECM, Impulse Response, FEVD, Granger Causality, Forecasting
-
Discrete Choice
Logit/Probit, FE Logit, RE Probit, Ordered, Multinomial, Dynamic
-
Count Data
Poisson, PPML, Negative Binomial, Zero-Inflated
-
Censored & Selection
Tobit, Honore, Panel Heckman (Wooldridge 1995)
-
Instrumental Variables
Panel IV/2SLS with first-stage diagnostics
-
Standard Errors
HC0-HC3, Clustered, Driscoll-Kraay, Newey-West, PCSE, Spatial HAC
-
50+ Diagnostic Tests
Specification, serial correlation, heteroskedasticity, unit root, cointegration
-
Visualization & Reports
35+ Plotly charts, HTML/LaTeX/Markdown reports, Master Reports
PanelBox vs. Stata, R, and linearmodels¶
| Feature | PanelBox | Stata | R (plm/splm) | linearmodels |
|---|---|---|---|---|
| Static Models (FE/RE) | ||||
| Difference GMM | ||||
| System GMM | ||||
| CUE-GMM | ||||
| Spatial Models (SAR/SEM/SDM) | ||||
| Dynamic Spatial | ||||
| Four-Component SFA | ||||
| Quantile FE (Canay) | ||||
| Panel VAR/VECM | ||||
| Interactive HTML Reports | ||||
| Experiment Pattern | ||||
| Google Colab Tutorials |
Installation¶
With optional extras:
pip install panelbox[dev] # Development tools
pip install panelbox[docs] # Documentation tools
pip install panelbox[test] # Testing tools
See the Installation Guide for detailed instructions.
Explore by Topic¶
-
Getting Started
Install and run your first model in 5 minutes
-
User Guide
Comprehensive guides for all 13 model families
-
Diagnostics
50+ validation and diagnostic tests
-
Tutorials
100+ interactive notebooks with Google Colab
-
API Reference
Complete technical reference for all classes and functions
-
Theory
Mathematical foundations and econometric background
Library Metrics¶
| Metric | Value |
|---|---|
| Lines of Code | 127,309 |
| Models | 70+ |
| Tests | 3,986 |
| Coverage | 85-92% |
| Diagnostic Tests | 50+ |
| Interactive Charts | 35+ |
| Tutorial Notebooks | 100+ |
Citation¶
If you use PanelBox in academic research, please cite:
@software{panelbox2026,
title = {PanelBox: Panel Data Econometrics for Python},
author = {PanelBox Development Team},
year = {2026},
url = {https://github.com/PanelBox-Econometrics-Model/panelbox},
version = {1.0.0}
}
Design Philosophy¶
PanelBox is built on four principles:
- Ease of Use -- R-style formulas and a pandas-friendly API let you go from data to results in three lines of code.
- Academic Rigor -- Every estimator follows published econometrics papers and is cross-validated against Stata and R.
- Performance -- Numba-optimized critical paths deliver up to 348x speedups on large panels.
- Publication-Ready Output -- LaTeX tables, interactive HTML reports, and Plotly visualizations are built in, not bolted on.