专栏名称: momo
Stata+R,从入门到提高
今天看啥  ›  专栏  ›  momo

Stata学习:CSMAR事件研究数据库!

momo  · 知乎专栏  ·  · 2024-06-22 08:30

文章预览

数据来源:国泰安。 清洗数据 cd C : \ Download \ 1 fs *. zip foreach f in ` r ( files ) '{ unzipfile ` f ' } * fs *. xlsx foreach f in ` r ( files ) '{ import excel using "`f'" , first clear qui { labone , n ( 1 ) drop in 1 / 2 cap ren Sgnyea year cap g year = substr ( Accper , 1 , 4 ) cap g year = substr ( DeclareDate , 1 , 4 ) cap g year = substr ( FirstDeclareDate , 1 , 4 ) cap g year = substr ( AccouPeri , 1 , 4 ) cap g year = substr ( SignDate , 1 , 4 ) cap g year = substr ( EventSignDate , 1 , 4 ) cap g year = substr ( LandingTime , 1 , 4 ) cap g year = substr ( SeismogenicTime , 1 , 4 ) cap g year = substr ( ChangeDate , 1 , 4 ) cap g year = substr ( ListedDate , 1 , 4 ) cap g year = DivdendYear cap ren Symbol Stkcd cap order year cap order Stkcd qui foreach v of ………………………………

原文地址:访问原文地址
快照地址: 访问文章快照
总结与预览地址:访问总结与预览