黃河泉 发表于 2017-9-4 17:24 https://www.statalist.org/forums/forum/general-stata-discussion/general/1370349- ...
好的~~谢谢~~我先看一下~另外还有一个问题也想请教一下。想要计算前三年的平均股利支付率,区间是2011-2013年,我找了2008年开始的数据,但是试了好几种方法都不行,
bysort comcd year:gen divps_mean =(divps[_n-1]+divps[_n-2]+divps[_n-3])/3
用这个命令生成的都是缺漏值,不知道该怎么办。打算用三年每股股利的和除以三年每股收益和
----------------------- copy starting from the next line -----------------------
------------------ copy up to and including the previous line --------