假设我使用这个数据集:
sysuse nlsw88, clear
我想运行回归并使用esttab将其保存到.tex文件 . 回归是这样的:
reg wage grade i.industry i.occupation, robust
重要的是,我想表明我正在使用行业和职业假人,但我不希望任何系数出现在表格中 .
一种方法是硬编码行业和职业指标:
eststo clear
eststo: reg wage grade, robust
estadd local industry "No"
estadd local occupation "No"
eststo: reg wage grade i.industry i.occupation, robust
estadd local industry "Yes"
estadd local occupation "Yes"
esttab est* using "${path}/regress_wage.tex", r2 ar2 b(3) se label booktabs ///
replace nodepvars nomtitles drop(*industry *occupation) ///
scalars("industry Industry" "occupation Occupation")
但我真的不想手动把它们放进去 . 我发现了 option
,但是我无法使用 i.
变量 . 我试过了:
eststo clear
eststo: reg wage grade, robust
eststo: reg wage grade i.industry i.occupation, robust
esttab est* using "${path}/regress_wage.tex", r2 ar2 b(3) se label booktabs ///
replace nodepvars nomtitles drop(*industry *occupation) ///
indicate(Industry = *industry*)
我也尝试过换掉最后一行:
indicate(Industry = _Iindustry*)
indicate(Industry = industry*)
indicate(Industry = *industry)
但没有任何作用 . 该怎么办?
另外,有没有办法让 Industry
和 Occupation
指标出现在常数下方而不是低于调整后的R平方?
1 回答
您可以使用
coefl
选项查看系数的命名方式,这对于在_1856763中引用它们非常有用: