其中任何一个都可以做到:
sysuse auto, clear
eststo clear
qui eststo a: estpost tabulate rep78 if foreign==0
qui eststo b: estpost tabulate rep78 if foreign==1
esttab, cells("cumpct(fmt(2))") ///
nonumber mtitles("a" "b") nodepvars noobs drop(Total) collabels(none)
eststo clear
qui eststo a, title("a"): estpost tabulate rep78 if foreign==0
qui eststo b, title("b"): estpost tabulate rep78 if foreign==1
esttab, cells("cumpct(fmt(2))") ///
nonumber mtitles nodepvars noobs drop(Total) collabels(none)
我更喜欢第二种语法,因为我喜欢在估计模型的位置附近命名模型。
两者都会产生类似于:
--------------------------------------
a b
--------------------------------------
1 4.17
2 20.83
3 77.08 14.29
4 95.83 57.14
5 100.00 100.00
--------------------------------------