一、测算方式:参考C刊《当代财经》纪亚方(2023)老师的研究,通过对上市公司被处罚涉及的年份进行追溯,为了保证企业违规行为变量度量的准确性,将追溯到公司被处罚的年份定义为违规年份。 采用两个指标对企业违规行为进行衡量:一是以虚拟变量Vio_dum表示企业违规行为倾向,若上市公司当年出现违规行为,则Vio_dum赋值为1,反之赋值为0;二是以Vio_num表示企业违规行为程度,即采用企业当年违规行为发生的次数进行度量。
二、资料范围:包括原始数据、运行代码、最终结果。
三、参考文献:纪亚方,梁日新,池亚楠.大数据税收征管能抑制企业违规行为吗——基于“金税三期”的准自然实验分析[J].当代财经,2023(02):43-54.DOI:10.13676/j.cnki.cn36-1030/f.2023.02.004.
四、数据处理代码:
import excel STK_Violation_Main.xlsx, sheet("sheet1") firstrow clear
labone,nrow(1)
drop in 1/2
gen id = Symbol
destring ViolationID DisposalDate DeclareDate ShortName CoFullName Promulgator FileName DocumentNumber Supervisor ViolationType ViolationTypeID Law ViolationYear Activity PunishmentMeasure SumPenalty IsViolated PunishmentType PunishmentTypeID Penalty id,replace
save STK_Violation_Main,replaceuse STK_Violation_Main,clear
keep if IsViolated == "Y"
keep ViolationID id ViolationYear
gen n =1
forv i = 1990/2022{
g t`i' = 0
replace t`i' = n if regexm(ViolationYear, "`i'")
}
drop ViolationYear n ViolationID
bys id: gen n=_n
tab n
forv i = 1/28{preservekeep if n ==`i'reshape long t, i(id) j(year)drop nren t t`i'save aa`i',replacerestore
}use aa1,clear
forv i = 2/28{
merge 1:1 id year using aa`i'
drop if _merge ==2
drop _merge
}
foreach var of varlist t*{replace `var'=. if `var'==0
}
egen Fi_Num = rownonmiss(t1 - t28)
drop t*
g Fi_Dum = ( Fi_Num > 0)
drop if year < 2000
keep if Fi_Dum == 1
save a ,replaceuse 上市公司基本信息年度表_简化版,clear
merge 1:1 id year using a
drop if _merge==2
drop _merge
replace Fi_Num=0 if Fi_Num==.
replace Fi_Dum=0 if Fi_Dum==.
keep id year id year Fi_Num Fi_Dum Symbol ShortName IndustryName Industry1 Industry2 STPT 金融业
label variable Fi_Dum "当年是否违规"
label variable Fi_Num "当年违规的次数"
save 最终结果-企业违规,replace
五、样例数据:
六、包含内容:
七、全部内容下载链接:https://download.csdn.net/download/samLi0620/90092058