* stata_codebook.do - attach long-form notes to the .dta files (run once in Stata). * Generated by build_data_dictionary.py - do not edit by hand. * ---- python_sc_bayes_spatial_source_data.dta ---- use "python_sc_bayes_spatial_source_data.dta", clear label data "State-year tobacco panel: cigarette sales + retail price" note _dta: Balanced annual panel exported from the scspill package (Abadie et al. 2010 California tobacco data). 39 states x 31 years = 1,209 rows, no missing values. California is the treated unit; the other 38 states are donors. treated = 1 for California in 1988-2000. note state: US state identifier. The treated unit is California; the other 38 states are donors.. Construction: From the scspill package panel (Abadie et al. 2010).. Units: string. Source: scspill package (Abadie et al. 2010) note state_id: Integer index for the state (1-39).. Construction: Sequential package index aligned to the alphabetical state list.. Units: integer (1-39). Source: scspill package note year: Annual time index of the panel.. Construction: Observed year, 1970-2000 (balanced; 31 years per state).. Units: year. Source: scspill package (Abadie et al. 2010) note cigsale: Annual per-capita cigarette pack sales. This is the synthetic-control outcome.. Construction: Observed tax-paid cigarette sales per capita, from the Abadie et al. (2010) tobacco data.. Units: packs per capita per year. Source: Abadie et al. (2010) via scspill note retprice: Average retail price per pack. The single covariate entering the SAR layer.. Construction: Observed state-level retail price, from the Abadie et al. (2010) tobacco data.. Units: cents per pack. Source: Abadie et al. (2010) via scspill note treated: 1 for California from 1988 onward; 0 otherwise. Note this is 1988, not 1989 - see the caveats.. Construction: Constructed as 1 if state == 'California' and year >= 1988 else 0 (the replication package's convention).. Units: 0/1. Source: Constructed save "python_sc_bayes_spatial_source_data.dta", replace * ---- python_sc_bayes_spatial_spatial_edges.dta ---- use "python_sc_bayes_spatial_spatial_edges.dta", clear label data "Donor-to-donor rook contiguity, long form" note _dta: The 38x38 contiguity matrix in long form, one row per adjacent ordered pair. Symmetric by construction, so every border appears twice. Zero-contiguity pairs are omitted rather than stored as zeros. Reshape to a matrix with the state list from the summary file. Row-normalisation happens inside the estimator. note state_i: The donor state whose neighbour is recorded in state_j.. Construction: Row index of the 38x38 rook contiguity matrix.. Units: string. Source: TIGER/Line 2024 boundaries, spdep::poly2nb(queen = FALSE) note state_j: A donor state sharing a land border with state_i.. Construction: Column index of the 38x38 rook contiguity matrix, kept only where the entry is 1.. Units: string. Source: TIGER/Line 2024 boundaries, spdep::poly2nb(queen = FALSE) note contiguous: Always 1 in this file - zero-contiguity pairs are omitted rather than stored.. Construction: Rook contiguity: 1 if the two states share a boundary segment, not merely a corner.. Units: 0/1. Source: TIGER/Line 2024 boundaries save "python_sc_bayes_spatial_spatial_edges.dta", replace * ---- python_sc_bayes_spatial_spatial_summary.dta ---- use "python_sc_bayes_spatial_spatial_summary.dta", clear label data "Per-donor spatial summary: degree and exposure to California" note _dta: One row per donor. w_california IS the w vector the model needs, and it has exactly one non-zero entry: Nevada. Degree ranges from 1 to 8 with a mean of 3.95. note state: US state identifier. The treated unit is California; the other 38 states are donors.. Construction: From the scspill package panel (Abadie et al. 2010).. Units: string. Source: scspill package (Abadie et al. 2010) note degree: How many other donor states this state borders. Its row sum in W.. Construction: Row sum of the 38x38 rook contiguity matrix.. Units: count. Source: Derived from the contiguity matrix note w_california: 1 if this donor borders California, 0 otherwise. THIS IS the w vector of the SAR model.. Construction: California's row of the full 39x39 contiguity matrix, restricted to the donor pool.. Units: 0/1. Source: TIGER/Line 2024 boundaries note borders_california: Integer duplicate of w_california, for convenience when filtering.. Construction: 1 if w_california > 0.. Units: 0/1. Source: Derived note neighbour_list: The donor states this state borders, listed alphabetically. Human-readable form of the edge list.. Construction: Names of the non-zero entries of this state's row of W.. Units: string. Source: Derived from the contiguity matrix save "python_sc_bayes_spatial_spatial_summary.dta", replace