* 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. * ---- simulated_panel_data.dta ---- use "simulated_panel_data.dta", clear label data "Synthetic spatial panel: outcome, 4 covariates + ground-truth surfaces" note _dta: Balanced spatial panel simulated from Li & Fotheringham (2026) Eqs. 39-45 (seed 42). One row per spatial unit x time period; alpha_true and beta1_true-beta4_true carry the known data-generating coefficients so estimators can be scored. Coordinates (coord_i, coord_j) are integer grid positions, identical across the unit's 3 periods. note unit_id: Identifier of the spatial unit (one of 225 grid cells); repeats across the unit's 3 time periods.. Construction: 0..224, in row-major order over the 15x15 grid (np.repeat(arange(225), 3)).. Units: integer ID (0-224). Source: Simulation note time_id: Period index within the panel (3 periods per unit). Not a calendar year.. Construction: np.tile(arange(3), 225); values 0, 1, 2.. Units: integer (0-2). Source: Simulation note coord_i: Row position of the unit on the 15x15 lattice; spatial coordinate for kernel weighting.. Construction: Row index 1..15, np.repeat(arange(1,16), 15) then replicated across time.. Units: grid units (1-15). Source: Simulation note coord_j: Column position on the 15x15 lattice; drives the exponential spatial-context gradient.. Construction: Column index 1..15, np.tile(arange(1,16), 15) then replicated across time.. Units: grid units (1-15). Source: Simulation note y: Simulated response: spatial context plus three causally-active covariates plus noise.. Construction: y = sc_i + beta1*x1 + beta2*x2 + beta3*x3 + epsilon; epsilon ~ N(0, 0.5). x4 is excluded (paper Eqs. 44-45).. Units: synthetic units. Source: Simulation note x1: Causally-active covariate; its true local slope beta1 is a quadratic dome peaking at the grid centre.. Construction: x1 = 0.05*sc_i + N(0, 0.5) (indirect contextual channel, paper Eq. 40).. Units: synthetic units. Source: Simulation note x2: Causally-active covariate; its true local slope beta2 is a linear gradient increasing with i+j.. Construction: x2 = 0.05*sc_i + N(0, 0.5) (paper Eq. 41).. Units: synthetic units. Source: Simulation note x3: Causally-active covariate; its true local slope beta3 is constant at 1.5 everywhere.. Construction: x3 = 0.05*sc_i + N(0, 0.5) (paper Eq. 42).. Units: synthetic units. Source: Simulation note x4: Covariate with NO causal effect on y (beta4 = 0); shares parent sc with y, so Cor(x4, y) ~ 0.84.. Construction: x4 = 0.05*sc_i + N(0, 0.5) (paper Eq. 43); omitted from the y equation.. Units: synthetic units. Source: Simulation note alpha_true: Known time-invariant confounder; the intrinsic contextual effect MGWFER recovers. Truth column - not an observable predictor.. Construction: sc_i = 30*(exp(j/15) - 1); exponential in column index j (range 2.07-51.55). Constant across the unit's 3 periods.. Units: synthetic units. Source: Simulation (ground truth) note beta1_true: Known spatially varying coefficient on x1; ground truth for scoring. Quadratic dome peaking at the grid centre.. Construction: 1 + (q^2-(q-i/2)^2)*(q^2-(q-j/2)^2)/q^4, q=ceil(15/4) (range 1.06-2.00). Constant across periods.. Units: coefficient. Source: Simulation (ground truth) note beta2_true: Known spatially varying coefficient on x2; ground truth for scoring. Linear gradient in i+j.. Construction: 1 + (i+j)/(2*15) (range 1.07-2.00). Constant across periods.. Units: coefficient. Source: Simulation (ground truth) note beta3_true: Known spatially homogeneous coefficient on x3; ground truth for scoring.. Construction: 1.5 everywhere (np.full(225, 1.5)).. Units: coefficient. Source: Simulation (ground truth) note beta4_true: Known null coefficient on x4; ground truth for false-positive testing.. Construction: 0 everywhere (np.zeros(225)).. Units: coefficient. Source: Simulation (ground truth) save "simulated_panel_data.dta", replace