文章预览
文献来源 Cheng, Q., Du, F., Wang, X., Wang, Y. (2016). Seeing is believing: analysts’ corporate site visits. Review of Accounting Studies, 21(4), 1245–1286. 数据来源 清洗数据 cd C : \ Download
u af_analystprofile_2023 , clear
drop Accper AnalystGender - ForecastNumber
duplicates drop
g i = _n
sa _1 , replace
keep i A *
ren Ananm N_
ren A n_
split N , p (,)
split n , p (,)
sa _2 , replace
*
forv i = 1 / 11 {
u _2 , clear
keep i * _ ` i '
drop if mi ( N )
compress
ren ( N n ) ( N n )
sa _2_ ` i ', replace
}
clear
forv i = 1 / 11 {
ap using _2_ ` i '
}
sa _3 , replace
*
u _1 , clear
keep i I B y
joinby i using _3
drop i
duplicates drop
sa _4 , replace
*
u IRM_INSTITUTIONCLASS_2023 , clear
drop if mi ( Researcher )
keep Stkcd year ReportD Res InstitutionName
destr
………………………………