全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 统计软件培训班VIP答疑区
1749 2
2013-11-17
连老师:
您好!
Stata 学术论文专题
Chang&Wong,2009,JCF -
*    Chang, E. C., Wong, S. M. L., 2009.
*      Governance with multiple objectives:
*      Evidence from top executive turnover in china.
*      Journal of Corporate Finance, 15(2): 230-244.
do文档
第457-464行
*-Tenure
    dropvars tenure*
bysort id ct3: egen tenure = min(dyears)
bysort id: egen tenure_av = mean(tenure)
replace tenure = tenure_av if tenure==.  // 缺漏值采用公司均值代替
bysort industry year: egen tenure_av_sic = mean(tenure)
replace tenure = tenure_av_sic if tenure==.
    br id year  dyears chgdt CT_yes CT_yes_miss ct123 ct3 tenure //查验处理过程
问题:
第462-463行:
bysort industry year: egen tenure_av_sic = mean(tenure)
replace tenure = tenure_av_sic if tenure==.
缺漏值已经由公司均值代替(第460-461行),这里缺漏值又由行业调整的均值替代,这两个替代是否有重复,后者(行业调整)是否会覆盖掉前者(公司均值),因为命令都是replace tenure =?

bysort id: egen tenure_av = mean(tenure)           已经以公司为单位算出均值,
bysort industry year: egen tenure_av_sic = mean(tenure)         为什么又以行业和年度为单位算出均值呢?
这二者有什么联系?对于替代缺漏值是否会重复?
谢谢连老师!
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2013-11-18 07:23:49
先是用公司均值替代缺漏值,但有些公司只有一年的资料,或者是所有年度上都缺了,此时只好启动第二套方案,采用行业均值进一步替代其他缺漏值。
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2013-11-18 17:05:47
连老师:
谢谢,百忙之中有这样快的解答疑问速度实属不易!
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群