I am using the command esttab in Stata to export a regression table. I would like to label my models with two different levels of group classification.
So far I have the Stata code below:
I would like to add another group classification for all the 4 models with the following label: "Outcome: Price". In my understanding, this would require us to add the following option to the esttab command above:
The problem is that esttab doesn't allow us to use the option -mgroups()- more than once. Does anyone have a solution to this?
To see the tabel in LaTeX:
So far I have the Stata code below:
Code:
sysuse auto, clear gen lowcost = (price<6000) reg price weight mpg if foreign==0 & lowcost==0 est sto reg1 reg price weight mpg if foreign==0 & lowcost==1 est sto reg2 reg price weight mpg if foreign==1 & lowcost==0 est sto reg3 reg price weight mpg if foreign==1 & lowcost==1 est sto reg4 local regressions reg1 reg2 reg3 reg4 esttab `regressions' using "Latex/test.tex", replace mgroups("Domestic" "Foreign", pattern(1 0 1 0) prefix(\multicolumn{@span}{c}{) suffix(}) span) mtitles("High-cost" "Low-cost" "High-cost" "Low-cost") nonumbers
Code:
mgroups("Outcome: Price", pattern(1 0 0 0) prefix(\multicolumn{@span}{c}{) suffix(}) span)
To see the tabel in LaTeX:
Code:
\documentclass{article} \begin{document} \input{test.tex} \end{document}
Comment