@liuyuxi
2021-08-18T13:10:16.000000Z
字数 3258
阅读 83
stata
*主要变量描述性统计--《CEO复合型职业经历、企业风险承担与企业价值》tabstat Risk1 Risk2 CEO_CERI CEO_POS-CEO_OVE Firmage Size Debt ROE TOP1 Cap Growth Ind Board Duality CEOAge CEOShare GDP,stat(count mean sd median min max)col(stat)*表1,treat为识别上市企业与非上市企业的虚拟变量--祝树金,汤超:《企业上市对出口产品质量升级的影响》tabstat quality $yy , stats(mean sd p25 p50 p75) col(s) format(%12.4f) //Note:注意col(s)与col(stat)ttable3 quality $yy, by(treat) f(%12.4f) //Note:注意ttable3(应是将两张表拼接在了一起)
**回归结果输出--《CEO复合型职业经历、企业风险承担与企业价值》esttab th1 th2 th3 th4 th5 th6, scalar(r2_a N) compress star(* 0.1 ** 0.05 *** 0.01) b(%6.4f) t(%6.4f) mtitles title(“hehe”) ,using thr2.rtf,replaceesttab eg1 eg2 eg3 eg4 eg5 eg6, scalar(r2_a N) compress star(* 0.1 ** 0.05 *** 0.01) b(%6.4f) t(%6.4f) mtitles title(“hehe”) ,using eg2.rtf,replaceesttab fx1 fx2 fx3 fx4 fx5 fx12 fx22 fx32 fx42 fx52, scalar(r2_a N) compress star(* 0.1 ** 0.05 *** 0.01) b(%6.4f) t(%6.4f) mtitles title(“hehe”) ,using fx.rtf,replace //Note:注意using 的位置;另外,esttab选项中的b(4) p(4) ar2(4)*感想:这些代码都是将许多结果放在一起输出,感觉表格第一行的分组应该都是作者后续添加的吧。**王若兰,刘灿雷:《市场竞争、利润分享与企业间工资不平等》;表4(输出6个回归结果)esttab d* using table-4.rtf, b(4) p(4) star(* 0.10 ** 0.05 *** 0.01) ar2(4) nogaps drop(*.year) compress replace表6 分位数回归结果(9个回归结果)esttab e* using table-5.rtf, b(4) p(4) star(* 0.10 ** 0.05 *** 0.01) ar2(4) nogaps drop(*.year) compress replace感觉分位数标号与底下的各种信息应该是后面添上的。表7的12个结果分两个表列出应该是将两个结果合并在一起形成的。esttab f* using table-7.rtf, b(4) p(4) star(* 0.10 ** 0.05 *** 0.01) ar2(4) nogaps drop(*.year) compress replace**周茂:《外资管制放松如何影响企业非产成品存货调整》(此文处理严谨)表2esttab m1 m2 m3 m4 m5, scalar(r2 N) compress star(* 0.1 ** 0.05 *** 0.01) b(%6.4f) t(%6.4f) order(fdi_regpost02 ) nogap, using table2.rtf,replace也是只输出了核心解释变量,也是将using放在最后面。但最值得注意的是m3-m5,分别加入post与处理前2000年的三个变量fdi*post02等。表4esttab m1 m2 m3 m4 m5 m6, scalar(r2 N) compress star(* 0.1 ** 0.05 *** 0.01) b(%6.4f) t(%6.4f) order( fdi_regpost02 ) nogap, using table4.rtf,replace表5确实是3张输出表格粘在一起,值得借鉴。同样是将using放在最后面。**《服务型对外直接投资与企业产出》输出8个回归结果(文章与code较细)outreg2 [ r1 r2 r3 r4 r5 r6 r7 r8] using basic, tstat word replace dec(4)
**王若兰,刘灿雷:《市场竞争、利润分享与企业间工资不平等》(根据图、表提供对应代码)*演变趋势对比图(实心连线图)use Figure-1-b.dta,cleartwoway(scatter mhhi year if Treat==1,c(l) legend(pos(12)))(scatter mhhi year if Treat==0,c(l) xline(2002))use Figure-1-b.dta,cleartwoway(scatter mhhi year if Treat==1,c(l) legend(pos(12)))(scatter mhhi year if Treat==0,c(l) xline(2002)) //Note:注意c(l)*图中插入一两条直线use Figure-2.dta,clearkdensity Beta,xline(0) xline(0.8862)count if Beta<0.8862 //Note:注意count if《外资管制放松如何影响企业非产成品存货调整》图1 处理组与对照组 变化趋势图use 数据1.dta , clearcollapse (mean) non_fin_inven, by(fdi_reg year) //注意collapse使用twoway (connected non_fin_inven year if fdi_reg==1, lpattern(dash) )(connected ///non_fin_inven year if fdi_reg==0, lpattern(solid) ), ytitle("非产成品存货", orientation(rvertical)) ///xline(2002) legend(label(1 "处理组的非产成品存货")label(2 "控制组的非产成品存货")) ///xlabel(1998(2)2008,angle(0)) graphregion(color(white)) plotregion(color(white)) ///ylabel(,angle(0))图2import excel using 数据3.xlsx, firstrow cleardestring year, replacetwoway (scatter y year if year>=1999 & year<=2002, connect(direct) lcolor(black) mcolor(black) msymbol(Oh)) ///(scatter y year if year>=2002 & year<=2007, connect(direct) lcolor(black) mcolor(black) msymbol(O)) ///(line yl year, lpattern(dash) lcolor(gs5)) ///(line yh year, lpattern(shortdash) lcolor(gs5)), ylabel(-0.05 "-0.05" -0.03 "-0.03" -0.01 "-0.01" 0.01 "0.01" 0.03 "0.03" 0.05 "0.05" 0.07 "0.07" 0.09 "0.09", angle(0)) ///xlabel(1998 (1) 2008) yline(0, lcolor(black)) ytitle("系数", orientation(rvertical)) xtitle(年份) legend(off) graphregion(color(white)) plotregion(color(white))