Loading...
Loading...
Run regression analyses in Stata with publication-ready output tables.
npx skill4agent add meleantonio/awesome-econ-ai-stuff stata-regressionesttaboutreg2regressreghdfextregesttaboutreg2* ============================================
* Regression Analysis with Stata
* ============================================
* Load data
use "data.dta", clear
* Summary stats
summarize y x1 x2 x3
* Main regression with clustered SEs
regress y x1 x2 x3, vce(cluster firm_id)
eststo model1
* Alternative specification with fixed effects
reghdfe y x1 x2 x3, absorb(firm_id year) vce(cluster firm_id)
eststo model2
* Export table
esttab model1 model2 using "results/regression_table.tex", replace se labelestoutesttabreghdfessc install estout
ssc install reghdfe