Examples¶
Each page mirrors a script in the repository’s examples/ directory and
shows its output. Run the scripts from the repository’s root:
python examples/quickstart.py
Page |
What it shows |
|---|---|
Difference and system GMM; |
|
Arellano and Bond (1991) and Blundell and Bond (1998), matching Roodman’s (2009) xtabond2 output |
|
Lag limits, |
|
Windmeijer’s correction, one- and two-way clustering, |
|
Region-by-year effects in difference GMM |
|
Nonlinear moment conditions for persistent series |
|
Kleibergen–Paap and Sanderson–Windmeijer tests |
|
A Parquet panel larger than memory |
The simulated data¶
dpd_stream.simulate.simulate_dynamic draws
The variables:
x is predetermined. It responds to past shocks, x_it = 0.5 x_i,t−1 + 0.5 α_i + 0.3 ε_i,t−1 + noise. It can also be made endogenous or strictly exogenous.
w is strictly exogenous, but correlated with α_i.
Options:
Starting point. With
stationary=True, panels start from their long-run means, the condition system GMM’s levels moments need. Withstationary=Falsethey don’t.Unbalanced panels and gaps:
unbalanced=Trueandp_gap=.Extra columns:
n_clusters=adds a column of clusters, andweights=Truea column of panel weights.
truth_dynamic() returns the true coefficients, named as the formulas name
them.