Estimate pooled / between / fixed / random-effects models side by side.
A linearmodels-backed companion to :func:expdpy.analyze_regression_table, returned in the same :class:~expdpy.RegressionTableResult container so .df, .interpret() and the apps work the same way. The one-way fixed-effects estimate matches analyze_regression_table(feffects=[entity]).
models (fitted linearmodels results), etable (the comparison table) and df (tidy coefficients with the same columns as the pyfixest path).
Examples
Basic — pooled / between / FE / RE side by side. With the panel declared by set_panel=True, entity and time are resolved automatically.
import expdpy as exfrom expdpy.data import load_kuznets, load_kuznets_data_defdf = ex.set_labels(load_kuznets(), load_kuznets_data_def(), set_panel=True)tab = ex.analyze_panel_table(df, dv="gini_regional", idvs=["log_gdp_pc"])tab.etable # comparison of the four estimatorstab.df # tidy coefficients, same columns as the pyfixest path
model
term
Estimate
Std. Error
t value
Pr(>|t|)
0
1
log_gdp_pc
-0.005374
0.007283
-0.737831
4.608143e-01
1
1
Intercept
0.322965
0.065923
4.899090
1.146224e-06
2
2
log_gdp_pc
-0.006157
0.005944
-1.035736
3.035258e-01
3
2
Intercept
0.330172
0.055416
5.958062
6.962191e-08
4
3
log_gdp_pc
0.029208
0.024353
1.199326
2.307569e-01
5
4
log_gdp_pc
0.007370
0.010576
0.696912
4.860425e-01
6
4
Intercept
0.205648
0.096506
2.130934
3.337182e-02
Advanced — pick a subset of estimators, robust SEs, and read the interpretation.
This OLS regression relates **gini_regional** to its regressors.
- **log_gdp_pc**: each one-unit increase is associated with gini_regional that is 0.00591 lower (not statistically significant at conventional levels).
- **trade_share**: each one-unit increase is associated with gini_regional that is 0.0576 lower (not statistically significant at conventional levels).
Model fit: N = 80, R² = 0.0428.
(This reads the first of 2 models in the table.)
_These are associations, not causal effects. A causal reading needs a research design — see `explain('correlation_vs_causation')`._