Datasets and Simulation#

ModernDiD includes built-in datasets for examples and benchmarking, as well as data generation functions for simulation studies and scalability testing.

Built-in Datasets#

load_mpdta

Load the County Teen Employment dataset for multiple time period DiD analysis.

load_nsw

Load the NSW (National Supported Work) demonstration dataset.

load_ehec

Load the EHEC dataset for Medicaid expansion analysis.

load_engel

Load the Engel household expenditure dataset.

load_favara_imbs

Load the Favara and Imbs banking deregulation dataset.

load_cai2016

Load the Cai (2016) agricultural insurance dataset.

Simulation Functions#

Functions for generating synthetic DiD and DDD panel data with known treatment effects, useful for Monte Carlo experiments and testing.

gen_cont_did_data

Simulate panel data for difference-in-differences with continuous treatment.

gen_did_scalable

Generate configurable staggered DiD data for stress-testing.

gen_ddd_2periods

Generate synthetic data for 2-period DDD estimation.

gen_ddd_mult_periods

Generate data with staggered treatment adoption for multi-period DDD.

gen_ddd_scalable

Generate configurable staggered DDD data for stress-testing.

gen_simple_ddd_data

Generate simple DDD panel data with a known treatment effect.