est sto m1//将这个模型保存为m1 reg happy lnincome $population $var est sto m2//将这个模型保存为m2 outreg2 [m1 m2] using "d:\", excel dec(3) alpha(0.001, 0.01, 0.05) /*将m1和m2共同输出到表格中,保存到d盘,dec(3)指保留三位...
reg y x1 $control ,r est sto m1 reg y x2 $control ,r est sto m2 reg y x3 $control ,r est sto m3 ``` 使用`esttab`命令导出回归结果到RTF文件: ```stata esttab m1 m2 m3 using huigui.rtf ,b(%12.3f) se(%12.3f) nogap compress /// s(N r2 ar2) star(*** 0.01 ** 0.05 ...
输入 reghdfe 被解释变量 主效应(DID),absorb(行政区划代码 年份)cluster(行政区划代码),然后用 est sto m1 存储结果。最后 esttab m1 using 基准回归.rtf,b(%12,4f) se(%12,4f) stats(N r2_a) nogap compress star(* 0.1 ** 0.05 *** 0.01) replace,把结果保存成 rtf 文件。🌟7. 平行趋势检验...
est sto m1 //保存模型 输出的结果: 方法2:LSDV(Least Square Dummy Variable) 先设定个体或时间的虚拟变量,再进行 ols 回归。 . reg waiting_all `income' worktime i.gestfips if any_time == 1 //设定州为虚拟变量,然后直接做回归 . est sto m2 //保存模型 输出的结果: 注意:两种方法计算方式不同...
用于表格输出reg happy lnincomeest sto m1 //将这个模型保存为m1reg happy lnincome $population $var est sto m2 //将这个模型保存为m2outreg2 [m1 m2] using "d:\", excel dec(3) alpha(0.001, 0.01, 0.05)/*将m1和m2共同输出到表格中,...
(州固定效应)。 . xtset gestfips //设定面板数据 . xtreg waiting_all `income' worktime if any_time == 1, fe //州固定效应 . est sto m1 //保存模型 输出的结果:方法2:LSDV(Least Square Dummy Variable) 先设定个体或时间的虚拟变量,再进行 ols 回归。
est sto m1reghdfe Y X D X_D Control_1 Control_2, absorb(id year) vce(r) est sto m2在这里,我们使用了reghdfe命令,它允许我们在模型中包含高维度的固定效应。absorb(id year)表示我们吸收了id和year的固定效应,而vce(r)则表示我们使用稳健标准误。最后...
est sto m1 *m1表示模型1,后续可用m2 m3等 同理,要进行更多回归并希望之后导出到同一个表格时,可以重复以上123步操作 得到所有回归后,可以用以下代码一次性导出排好版的所有结果 esttab m1 m2 m3 using table1.rtf,b(%12.4f) t(%12.2f) ar2 scalars(industry year N) star(* 0.1 ** 0.05 *** 0.01...
est sto + name 最后再使用esttab命令输出结果 sysuse auto,clear reg price wei,r est sto m1 reg price wei len,r est sto m2 reg price wei len foreign,r est sto m3 esttab m1 m2 m3 using out.csv,replace /// scalars(r2_a N F) nogap brackets b(%6.3f) compress /// ...
est sto m2 *再做一个回归 esttab m1 m2 using regout1.rtf, b(%12.3f) se(%12.3f) nogap compress /// s(N r2 ar2) star(* 0.1 ** 0.05 *** 0.01) *b是回归系数保留三位小数,se是标准误保留三位小数,s是报告什么统计量。导出到名为regout的文件 ...