*TFP测算程序*
***OP估计***
opreg   lnv_r, exit( exit) state(  lnkr ) proxy(lninvr) free(  lnm_r lnl ) 
 estimates store op_v
gen ln_op_v=lnv_r- _b[ lnkr]* lnkr- _b[ lnl]* lnl- _b[ lnm_r]* lnm_r

opreg   lnva_r, exit( exit) state(  lnkr ) proxy(  lninvr) free(  lnm_r lnl ) 
 estimates store op_va
gen ln_op_va=lnva_r- _b[ lnkr]* lnkr- _b[ lnl]* lnl- _b[ lnm_r]* lnm_r

***LP估计***
rename lnkr lnk_r 
rename lninvr lninv_r 
levpet lnv_r,free(lnl) proxy(lnm_r) capital(lnk_r) i(id) t(year)   revenue 
 estimates store lp_v
gen ln_lp_v=lnv_r- _b[ lnk_r]* lnk_r- _b[ lnl]* lnl- _b[ lnm_r]* lnm_r

levpet lnva_r,free(lnl) proxy(lnm_r) capital(lnk_r) i(id) t(year)  valueadded
 estimates store lp_va
gen ln_lp_va=lnva_r- _b[ lnk_r]* lnk_r- _b[ lnl]* lnl 

*回归程序*
***表2  基准回归结果***
areg Esi Ind_Post i.year,absorb(id) vce(cluster id)
areg Esi Ind_Post tfp size age subsidy finance soe foreign hhi i.year,absorb(id) vce(cluster id)
areg Esi Ind_Post hbzc i.year,absorb(id) vce(cluster id)
areg Esi Ind_Post tfp size age subsidy finance soe foreign hhi hbzc i.year,absorb(id) vce(cluster id)

***表3  平行趋势检验***
areg Esi Ind_Post Ind_2000 Ind_2001 Ind_2002 Ind_2003 Ind_2004 Ind_2005 Ind_2006 Ind_2007 tfp size age subsidy finance soe foreign hhi i.year,absorb(id) vce(cluster id)
areg Esi Ind_Post Ind_2000 Ind_2001 Ind_2002 Ind_2003 Ind_2004 Ind_2005 Ind_2006 Ind_2007 tfp size age subsidy finance soe foreign hhi hbzc i.year,absorb(id) vce(cluster id)
areg Esi Ind1_Post1 Ind_2000 Ind_2001 Ind_2002 Ind_2003 Ind_2004 Ind_2005 Ind_2006 Ind_2007 tfp size age subsidy finance soe foreign hhi i.year,absorb(id) vce(cluster id)
areg Esi Ind1_Post1 Ind_2000 Ind_2001 Ind_2002 Ind_2003 Ind_2004 Ind_2005 Ind_2006 Ind_2007 tfp size age subsidy finance soe foreign hhi hbzc i.year,absorb(id) vce(cluster id)

***表4  稳健性检验***
areg Esi Ind2_Post2 tfp size age subsidy finance soe foreign hhi hbzc i.year,absorb(id) vce(cluster id)
areg Quality Ind_Post tfp size age subsidy finance soe foreign hhi hbzc i.year,absorb(id) vce(cluster id)
areg Esi Ind3_Post3 tfp size age subsidy finance soe foreign hhi hbzc i.year,absorb(id) vce(cluster id)
areg Esi Ind4_Post4 tfp size age subsidy finance soe foreign hhi hbzc i.year,absorb(id) vce(cluster id)

***表5  异质性分析：考虑资产规模和资本密集度***
areg Esi Ind2_Post2 tfp size age subsidy finance soe foreign hhi hbzc i.year if sizedummy==0 ,absorb(id) vce(cluster id)
areg Esi Ind2_Post2 tfp size age subsidy finance soe foreign hhi hbzc i.year if sizedummy==1,absorb(id) vce(cluster id)
areg Esi Ind2_Post2 tfp size age subsidy finance soe foreign hhi hbzc i.year if captialdummy==0 ,absorb(id) vce(cluster id)
areg Esi Ind2_Post2 tfp size age subsidy finance soe foreign hhi hbzc i.year if captialdummy==1,absorb(id) vce(cluster id)

***表6  异质性分析：考虑所有制属性和政府补贴***
areg Esi Ind2_Post2 tfp size age subsidy finance soe foreign hhi hbzc i.year if ownershipdummy==0 ,absorb(id) vce(cluster id)
areg Esi Ind2_Post2 tfp size age subsidy finance soe foreign hhi hbzc i.year if ownershipdummy==1 ,absorb(id) vce(cluster id)
areg Esi Ind2_Post2 tfp size age subsidy finance soe foreign hhi hbzc i.year if ownershipdummy==2 ,absorb(id) vce(cluster id)
areg Esi Ind2_Post2 tfp size age subsidy finance soe foreign hhi hbzc i.year if subsidydummy==0 ,absorb(id) vce(cluster id)
areg Esi Ind2_Post2 tfp size age subsidy finance soe foreign hhi hbzc i.year if subsidydummy==1 ,absorb(id) vce(cluster id)
areg Esi Ind2_Post2 tfp size age subsidy finance soe foreign hhi hbzc i.year if subsidydummy==2 ,absorb(id) vce(cluster id)

***表7  影响渠道分析***
areg Esi Ind_Post tfp size age subsidy finance soe foreign hhi hbzc i.year,absorb(id) vce(cluster id)
areg Innovation Ind_Post tfp size age subsidy finance soe foreign hhi hbzc i.year,absorb(id) vce(cluster id)
areg Transformation Ind_Post tfp size age subsidy finance soe foreign hhi hbzc i.year,absorb(id) vce(cluster id)
areg Exit×Yeardum Ind_Post tfp size age subsidy finance soe foreign hhi hbzc i.year,absorb(id) vce(cluster id)
areg Esi Innovation Transformation Exit×Yeardum Ind_Post tfp size age subsidy finance soe foreign hhi hbzc i.year,absorb(id) vce(cluster id)

***表8  清洁生产与行业出口技术复杂度变动效应的计量检验结果***
areg Reallocation Ind_Post tfp size age subsidy finance soe foreign hhi hbzc i.cic i.year,absorb(id) vce(cluster i.cic)
areg Survive Ind_Post tfp size age subsidy finance soe foreign hhi hbzc i.cic i.year,absorb(id) vce(cluster i.cic)
areg Entry Ind_Post tfp size age subsidy finance soe foreign hhi hbzc i.cic i.year,absorb(id) vce(cluster i.cic)
areg Exit Ind_Post tfp size age subsidy finance soe foreign hhi hbzc i.cic i.year,absorb(id) vce(cluster i.cic)
