【发布时间】:2018-08-29 20:16:11
【问题描述】:
我在 Stata 中使用 community-contributed 命令 outreg2 创建一个基于分类变量的具有多个回归的表:
bysort Sector: outreg2 using results_by_sectors.xls, replace dec(2) ///
keep(log_tfp_leader_growth years_schooling_normalized ///
tfp_gap_years_school_norm i_rd_go tfp_gap_i_rd) title("Regressions By Sectors") ///
label: reg log_tfp_growth log_tfp_leader_growth years_schooling_normalized ///
tfp_gap_years_school_norm, robust
除了一件事,一切都很好;表格而不是使用分类变量 Sector 的名称/标签弹出为Sector 1、Sector 2、Sector 3 等等:
但是,每个部门的标签/名称是:
tab Sector
ind | Freq. Percent Cum.
------------+-----------------------------------
10-12 | 236 3.88 3.88
13-15 | 236 3.88 7.76
16-18 | 236 3.88 11.64
19 | 220 3.62 15.26
20-21 | 220 3.62 18.88
22-23 | 236 3.88 22.76
24-25 | 220 3.62 26.38
26-27 | 220 3.62 30.00
28 | 220 3.62 33.62
29-30 | 220 3.62 37.24
31-33 | 220 3.62 40.86
A | 284 4.67 45.53
B | 284 4.67 50.20
D-E | 252 4.14 54.34
F | 284 4.67 59.01
G | 284 4.67 63.68
我应该如何修改我的outreg2 代码,而不是在每个回归的列名中获取Sector 1、Sector 2 来获取每个部门的标签,如上所示(例如10-12 等)?
【问题讨论】:
标签: stata