diff_diff.load_prop99#
- diff_diff.load_prop99(force_download=False)[source]
Load the California Proposition 99 smoking dataset (Lee-Wooldridge format).
This dataset tracks per capita cigarette sales across 39 U.S. states (California plus 38 never-treated donor states) from 1970 to 2000. California passed Proposition 99, a large tobacco tax and control program, effective in 1989. With a single treated unit, it is the canonical setting for small-sample DiD inference and synthetic control comparisons.
- Parameters:
force_download (bool, default=False) – If True, re-download the dataset even if cached.
- Returns:
Panel dataset with columns: - state : str - State name - year : int - Year (1970-2000) - first_year : int - Treatment start year (1989 for California, 0 = never) - lcigsale : float - Log per capita cigarette sales (packs) - treated : int - 1 if treatment in effect, 0 otherwise - cohort : int - Alias for first_year
- Return type:
pd.DataFrame
Notes
This is the cohort-format version of the Abadie, Diamond & Hainmueller (2010) California tobacco data distributed (MIT license) with the authors’ Stata
lwdidpackage by Hur, Lee and Wooldridge. The donor pool excludes states with their own tobacco programs, leaving exactly one treated state and 38 controls.Downloads are verified against a pinned SHA-256 and validated against the source invariants (39 states, 1970-2000, single 1989 cohort). If the real data cannot be obtained, a SYNTHETIC same-schema fallback is returned with a
UserWarning; checkdf.attrs["source"]("lwdid_ssc_ancillary"= real data,"synthetic_fallback"= synthetic - never use the fallback for replication).References
Lee, S. J., & Wooldridge, J. M. (2026). Simple Approaches to Inference with Difference-in-Differences Estimators with Small Cross-Sectional Sample Sizes. SSRN Working Paper No. 5325686.
Abadie, A., Diamond, A., & Hainmueller, J. (2010). Synthetic Control Methods for Comparative Case Studies: Estimating the Effect of California’s Tobacco Control Program. Journal of the American Statistical Association, 105(490), 493-505.
Examples
>>> from diff_diff.datasets import load_prop99 >>> from diff_diff import DifferenceInDifferences >>> >>> prop99 = load_prop99() >>> prop99["treated_state"] = (prop99["first_year"] > 0).astype(int) >>> prop99["post"] = (prop99["year"] >= 1989).astype(int) >>> >>> did = DifferenceInDifferences() >>> results = did.fit( ... prop99, outcome="lcigsale", treatment="treated_state", time="post" ... )