下载外部命令:ssc install outreg2 logout pwcorr_a
outreg2 using xxx.doc, replace sum(log) title(Decriptive statistics)
outreg2 using xxx.doc, replace sum(log) keep(**v** **v** **v**) title(Decriptive statistics)
outreg2 using xxx.doc, replace sum(log) keep(**v** **v** **v**) eqkeep(N mean min max) title(Decriptive statistics)
bysort x:outreg2 using xxx.doc, replace sum(log) title(Decriptive statistics)
logout, save (xxx)word replace: pwcorr
logout, save(xxx) word replace: pwcorr_a
outreg2 using xxx.doc,replace tstat bdec(3) tdec(2) ctitle(y)
outreg2 using xxx.doc,replace tstat bdec(3) tdec(2) e(r2_a,F) addstat(F test,e(p))
outreg2 using xxx.doc,append tstat bdec(3) tdec(2) e(r2_a,F) addstat(F test,e(p))
固定效应:
xtreg y x1 x2 x3,fe r
outreg2 using xxx.doc,replace tstat bdec(3) tdec(2) ctitle(y) e(r2_a,F) addstat(F test,e(p)) addtext(Company FE, YES )
xtreg y x1 x2 x3 i.year,fe r
outreg2 using xxx.doc,replace tstat bdec(3) tdec(2) ctitle(y) e(r2_a,F) addstat(F test,e(p)) addtext(Company FE, YES,Year FE, YES)
基础命令:
Describe
List
Sum(obs统计数量, mean平均值, std.dev标准差, min最小值, max最大值)
pwcorr_a price weight mpg displ, star1(0.01) star5(0.05) star10(0.1)
显著性解释变量是原因,被解释变量是结果。