Utilities

diff_stream.simulate.simulate_panel(n_units=1000, periods=8, *, seed=42, noise=1.0)[source]

Balanced panel with never-treated units, serial dependence and effects varying by cohort and exposure. Returns id, time, first_treat, y, truth.

diff_stream.simulate.simulate_conditional_panel(n_units=1200, periods=5, *, seed=871, time_varying=True)[source]

Confounded staggered panel with numeric and categorical covariates.

Cohorts depend on unit-level x/z; effects differ by cohort and exposure. Time-varying x exercises the earlier-comparison-period convention.

diff_stream.etable is hdfe-stream’s table of several fits (through pyfixest), diff_stream.limit_threads is stream-limits’ thread limit, and diff_stream.Profile is hdfe-stream’s resource profile, returned by profile=True; see their documentation.