//将截面数据变成面板数据
数据格式截图:
reshape long a,i(id) j(year)//单个变量转换
reshape long a b c... ,i(id) j(year)//多个变量转换
//安装导出命令
ssc install reg2docx
ssc install logout
ssc install reg2docx //最推荐
//将字符串变量转成数字
destring lev,replace force
//描述性统计
outreg2 using out1.doc,replace sum(log) title(Descriptive statistics)
//导出相关性分析
logout,save(out2) word replace:pwcorr csr esop fs lev idn eps ratio manager lny roa,star(0.05)
//调节机制
quiet xtreg csr esop idn eps ratio manager lny roa,fe
est store m1
quiet xtreg csr esop idn eps fs ratio manager lny roa,fe
est store m2
quiet xtreg csr esop idn eps lev ratio manager lny roa,fe
est store m3
reg2docx m1 m2 m3 using out.docx,replace b(%9.3f) t(%9.3f) scalars(N r2 F) title(biao)
//稳健性检验
gen d_csr=ln(csr)
<