【发布时间】:2015-12-15 19:18:12
【问题描述】:
假设我使用这个数据集:
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 平方下方?
【问题讨论】:
标签: label latex regression stata