工业企业异质性——僵尸和股权
作者:互联网
//处理股权性质文件,识别企业类别 cd C:\Users\admir\Desktop\银行竞争\指标数据 xls2dta: import excel C:\Users\admir\Desktop\银行竞争\指标数据\股权性质\EN_EquityNatureAll.xlsx, first case(lower) use "EN_EquityNatureAll.dta",clear gen year=year(date(enddate,"YMD")) drop if year<2000 keep if month(date(enddate,"YMD"))==12 destring symbol, gen(stkcd) drop symbol save "EN_EquityNatureAll.dta",replace sort stkcd year by stkcd year: gen set=_n keep if set==1 drop set
//2. merge文件 cd C:\Users\admir\Desktop\银行竞争\data use "回归文件.dta",clear merge 1:1 stkcd year using "EN_EquityNatureAll.dta" //date替换成year //keep if _merge==3 drop _merge save "股权分类回归.dta",replace //对国有企业和非国有企业分类回归 use "股权分类回归.dta",clear drop if equitynatureid=="" tab equitynatureid //tab查看某变量有哪些取值 xtset stkcd year gen SOE = inlist(equitynatureid, "1", "1,2","1,2,3","1,3") // 用inlist对多值分类,生成虚拟变量 xtreg w_cashholdings lnnumber_in_5km w_roaa w_qb w_lev w_cashflow w_capex w_size //winsor ncashholdings,gen(w_ncashholdings) p(0.01) xtreg w_ncashholdings lnnumber_in_5km w_roaa w_qb w_lev w_cashflow w_capex w_size if SOE==1,fe est store ncashholdings5 xtreg w_ncashholdings lnnumber_in_10km w_roaa w_qb w_lev w_cashflow w_capex w_size if SOE==1,fe est store ncashholdings10 xtreg w_ncashholdings lnnumber_in_20km w_roaa w_qb w_lev w_cashflow w_capex w_size if SOE==1,fe est store ncashholdings20 xtreg w_ncashholdings lnnumber_in_5km w_roaa w_qb w_lev w_cashflow w_capex w_size if SOE==0,fe est store ncashholding5 xtreg w_ncashholdings lnnumber_in_10km w_roaa w_qb w_lev w_cashflow w_capex w_size if SOE==0,fe est store ncashholding10 xtreg w_ncashholdings lnnumber_in_20km w_roaa w_qb w_lev w_cashflow w_capex w_size if SOE==0,fe est store ncashholding20 //winsor lnncashholdings,gen(w_lnncashholdings) p(0.01) xtreg w_lnncashholdings lnnumber_in_5km w_roaa w_qb w_lev w_cashflow w_capex w_size if SOE==1,fe est store lnncashholdings5 xtreg w_lnncashholdings lnnumber_in_10km w_roaa w_qb w_lev w_cashflow w_capex w_size if SOE==1,fe est store lnncashholdings10 xtreg w_lnncashholdings lnnumber_in_20km w_roaa w_qb w_lev w_cashflow w_capex w_size if SOE==1,fe est store lnncashholdings20 xtreg w_lnncashholdings lnnumber_in_5km w_roaa w_qb w_lev w_cashflow w_capex w_size if SOE==0,fe est store lnncashholding5 xtreg w_lnncashholdings lnnumber_in_10km w_roaa w_qb w_lev w_cashflow w_capex w_size if SOE==0,fe est store lnncashholding10 xtreg w_lnncashholdings lnnumber_in_20km w_roaa w_qb w_lev w_cashflow w_capex w_size if SOE==0,fe est store lnncashholding20 outreg2[ncashholdings5 ncashholdings10 ncashholdings20 lnncashholdings5 lnncashholdings10 lnncashholdings20] using cashholdings.doc,tstat bdec(3) tdec(3) addstat(Ajusted R2,`e(r2_a)') replace // 随机效应模型没有r2会报错 outreg2[ncashholding5 ncashholding10 ncashholding20 lnncashholding5 lnncashholding10 lnncashholding20] using cashholding.doc,tstat bdec(3) tdec(3) addstat(Ajusted R2,`e(r2_a)') replace // 随机效应模型没有r2会报错 //对于僵尸企业 gen st=regexm(shortname,"ST") //筛选出含有ST的公司为1,僵尸企业 xtreg w_ncashholdings lnnumber_in_5km w_roaa w_qb w_lev w_cashflow w_capex w_size if st==1,fe est store ncashholdings5 xtreg w_ncashholdings lnnumber_in_10km w_roaa w_qb w_lev w_cashflow w_capex w_size if st==1,fe est store ncashholdings10 xtreg w_ncashholdings lnnumber_in_20km w_roaa w_qb w_lev w_cashflow w_capex w_size if st==1,fe est store ncashholdings20 xtreg w_lnncashholdings lnnumber_in_5km w_roaa w_qb w_lev w_cashflow w_capex w_size if st==1,fe est store lnncashholdings5 xtreg w_lnncashholdings lnnumber_in_10km w_roaa w_qb w_lev w_cashflow w_capex w_size if st==1,fe est store lnncashholdings10 xtreg w_lnncashholdings lnnumber_in_20km w_roaa w_qb w_lev w_cashflow w_capex w_size if st==1,fe est store lnncashholdings20 outreg2[ncashholdings5 ncashholdings10 ncashholdings20 lnncashholdings5 lnncashholdings10 lnncashholdings20] using st1.doc,tstat bdec(3) tdec(3) addstat(Ajusted R2,`e(r2_a)') replace // 随机效应模型没有r2会报错 xtreg w_ncashholdings lnnumber_in_5km w_roaa w_qb w_lev w_cashflow w_capex w_size if st==0,fe est store ncashholding5 xtreg w_ncashholdings lnnumber_in_10km w_roaa w_qb w_lev w_cashflow w_capex w_size if st==0,fe est store ncashholding10 xtreg w_ncashholdings lnnumber_in_20km w_roaa w_qb w_lev w_cashflow w_capex w_size if st==0,fe est store ncashholding20 xtreg w_lnncashholdings lnnumber_in_5km w_roaa w_qb w_lev w_cashflow w_capex w_size if st==0,fe est store lnncashholding5 xtreg w_lnncashholdings lnnumber_in_10km w_roaa w_qb w_lev w_cashflow w_capex w_size if st==0,fe est store lnncashholding10 xtreg w_lnncashholdings lnnumber_in_20km w_roaa w_qb w_lev w_cashflow w_capex w_size if st==0,fe est store lnncashholding20 outreg2[ncashholding5 ncashholding10 ncashholding20 lnncashholding5 lnncashholding10 lnncashholding20] using st0.doc,tstat bdec(3) tdec(3) addstat(Ajusted R2,`e(r2_a)') replace // 随机效应模型没有r2会报错
标签:lnnumber,股权,僵尸,xtreg,capex,异质性,qb,lev,cashflow 来源: https://www.cnblogs.com/celine227/p/14888812.html