Some STATA Coding Hint for Estimators
I present here one simple trick that makes your estimation coding much much nicer and faster. I have been using it before, but not with the current laptop. Thus, I just checked how to obtain it. What does this magical code do? It creates a nice table of your estimation resultS. This enables you to check many regressions at once. Additionally, the table looks good and it uses the variable names you have in STATA. First you need the packet. Just type ssc install estout, replace on stata command window. Then, when coding, you tell STATA that you want to keep the results by adding eststo: in front of your regression. Here is an example with a loop. foreach var in spill1 spill2 spill3{ eststo: xtgls dlny $explanatory `var', fe } esttab using "$caritaoutput\output.rtf", replace ( note that $explanatory gives me variables saved there by global command. It is used like this: global explanatory var1 var2 var3 var4 ...