------------------------------------------------------------------------------- name: log: /Users/kareemhaggag/Dropbox/Test/websites/judge-cases/reproduce/co > author_table.log log type: text opened on: 1 Jun 2026, 11:24:26 . . use "analysis_sample.dta", clear . . * labels for nicer table output . label var father_wealth_100pp "Father's wealth (0-1 percentile rank)" . label var ruling_direction "LLM ruling (direction)" . label var ruling_binary "LLM ruling (binary)" . label var reasoning_direction "LLM reasoning (direction)" . label var reasoning_binary "LLM reasoning (binary)" . label var d2v_sent "Doc2Vec sentiment (business)" . label var d2v_simi "Doc2Vec similarity (business)" . label var y_labor_epa_lose "Vote against regulator (Labor/EPA)" . . local controls "republican female BirthYear" . local text_outcomes "ruling_direction ruling_binary reasoning_direction reaso > ning_binary d2v_sent d2v_simi" . . * ============================================================ . * Summary stats . * ============================================================ . estpost tabstat ruling_direction ruling_binary reasoning_direction reasoning_ > binary d2v_sent d2v_simi y_labor_epa_lose fat > her_wealth_100pp `controls', statistics(mean sd count) column > s(statistics) Summary statistics: mean sd count for variables: ruling_direction ruling_binary reasoning_direction reasonin > g_binary d2v_sent d2v_simi y_labor_epa_lose father_wealth_100pp republican fe > male BirthYear | e(mean) e(sd) e(count) -------------+--------------------------------- ruling_dir~n | .0631249 .980761 115612 ruling_bin~y | .5144968 .499792 115612 reasoning_~n | -.1291561 .5145338 115612 reasoning_~y | .076134 .2652135 115612 d2v_sent | .1137335 .1163784 132552 d2v_simi | .0013868 .0298586 132552 y_labor_ep~e | .89398 .3078699 23156 father_wea~p | .7636923 .2583223 133212 republican | .5271522 .4992641 133212 female | .0262364 .1598381 133212 BirthYear | 1902.943 27.20775 133212 . esttab . using "coauthor_sumstats.tex", replace booktabs cells("mean(fmt( > 4)) sd(fmt(4)) count(fmt(0))") label nonum collabels("Mean" "SD" "N") > title("Summary statistics") note("Outcomes are non-missing only on their > respective analytic samples (115K LLM votes for the text outcomes; 23K Labor > /EPA votes for y_labor_epa_lose).") (output written to coauthor_sumstats.tex) . . * ============================================================ . * PART 1 -- text outcomes (LLM + Doc2Vec) . * Sample: rows where the LLM ruling/reasoning measures are non-missing . * ============================================================ . preserve . keep if !missing(ruling_direction) (17,600 observations deleted) . bys jid year: gen n_jy = _N . gen wjt = 1 / n_jy . . eststo clear . foreach y of local text_outcomes { 2. qui reghdfe `y' father_wealth_100pp `controls', absorb > (circuit##year) cluster(jid) 3. eststo P_`y' 4. qui reghdfe `y' father_wealth_100pp `controls' [aw=wjt], > absorb(circuit##year) cluster(jid) 5. eststo W_`y' 6. } . restore . . * ============================================================ . * PART 2 -- voting against the regulator (canonical Labor/EPA) . * Sample: rows where y_labor_epa_lose is non-missing. . * . * We run TWO versions of the outcome side-by-side: . * (a) y_labor_epa_lose -- the original QJE coding . * (b) y_labor_epa_lose_alt -- an alternate coding that fixes one . * clear bug. The original formula in govt_wins.py codes . * (govt_petitioner & Affirmed) as govt_loses, but for NLRB . * enforcement petitions an Affirmed disposition means the court . * enforced the Board's order -- i.e. the government won. The . * alternate version toggles y_lose for those 1,099 votes (out . * of 23,156). Substantive results are very similar. . * ============================================================ . gen y_labor_epa_lose_alt = y_labor_epa_lose (110,056 missing values generated) . replace y_labor_epa_lose_alt = 1 - y_labor_epa_lose_alt if govt_petitione > r==1 & affirmed==1 & !missing(y_labor_epa_lose) (1,099 real changes made) . label var y_labor_epa_lose "Vote against regulator (original)" . label var y_labor_epa_lose_alt "Vote against regulator (Alt coding)" . . preserve . keep if !missing(y_labor_epa_lose) (110,056 observations deleted) . bys jid year: gen n_jy = _N . gen wjt = 1 / n_jy . . foreach y in y_labor_epa_lose y_labor_epa_lose_alt { 2. qui reghdfe `y' father_wealth_100pp `controls', absorb > (circuit##year) cluster(jid) 3. eststo P_`y' 4. qui reghdfe `y' father_wealth_100pp `controls' [aw=wjt], > absorb(circuit##year) cluster(jid) 5. eststo W_`y' 6. } . restore . . * ============================================================ . * EXPORT -- one pooled panel and one WJT panel, columns are outcomes . * ============================================================ . esttab P_ruling_direction P_ruling_binary P_reasoning_direction P_reasoning_b > inary P_d2v_sent P_d2v_simi P_y_labor_epa_lose P_y_labor_epa_lose_alt > using "coauthor_table_pooled.tex", replace booktabs label keep(fat > her_wealth_100pp `controls') order(father_wealth_100pp `controls') cells( > b(fmt(4)) se(par fmt(4))) stats(N r2 N_clust, fmt(0 3 0) labels("Observat > ions" "R-squared" "Judges (clusters)")) mtitles("LLM rul dir" "LLM rul bi > n" "LLM rea dir" "LLM rea bin" "D2V sent" "D2V simi" "y\_lose (or > ig)" "y\_lose (Alt)") title("Panel A. Father's wealth on each outcome, po > oled (unweighted)") note("Controls: republican, female, BirthYear. FE: ci > rcuit x year. SE clustered by judge. Cols 1-6 use the LLM analytic sample (11 > 5K author-level rows, business-relevant cases); cols 7-8 use the Labor/EPA an > alytic sample (23K panel-vote rows). Col 8 applies the alternate coding: togg > les y_lose where govt is petitioner and disposition is Affirmed (1,099 votes) > .") (output written to coauthor_table_pooled.tex) . . esttab W_ruling_direction W_ruling_binary W_reasoning_direction W_reasoning_b > inary W_d2v_sent W_d2v_simi W_y_labor_epa_lose W_y_labor_epa_lose_alt > using "coauthor_table_wjt.tex", replace booktabs label keep(father > _wealth_100pp `controls') order(father_wealth_100pp `controls') cells(b(f > mt(4)) se(par fmt(4))) stats(N r2 N_clust, fmt(0 3 0) labels("Observation > s" "R-squared" "Judges (clusters)")) mtitles("LLM rul dir" "LLM rul bin" > "LLM rea dir" "LLM rea bin" "D2V sent" "D2V simi" "y\_lose (orig) > " "y\_lose (Alt)") title("Panel B. Father's wealth on each outcome, WJT-w > eighted (in-sample)") note("Same spec with [aw=wjt]. WJT (Weight per Judg > e-Year) = 1 / # cases per judge-year, within each analytic sample. Col 8 appl > ies the alternate coding fix.") (output written to coauthor_table_wjt.tex) . . esttab P_* W_* using "coauthor_table.csv", replace plain keep(father_weal > th_100pp) cells(b(fmt(4)) se(par fmt(4))) stats(N r2 N_clust, fmt(0 3 0)) > nomtitles (output written to coauthor_table.csv) . . log close name: log: /Users/kareemhaggag/Dropbox/Test/websites/judge-cases/reproduce/co > author_table.log log type: text closed on: 1 Jun 2026, 11:24:30 -------------------------------------------------------------------------------