每个ind_year就取一个值去算总的平均值,如-35-1.62746+1.253759-31.37509+3.359876-32.30906/6
求助命令,谢谢了。
Q2:上图部分命令如下:
- sum ind_year
- scalar a= r(min)
- scalar b= r(max)
- gen coecfo=.
- forvalues j= `=scalar(a)'(1)`=scalar(b)' {
- display `j'
- reg wc cfo sales ppegt if ind_year==`j'
- predict pre_wc_`j' if ind_year==`j', xb
- replace coecfo= _b[cfo] if ind_year==`j'
- }
为了算the mean values of the coefficients across industry-years. 分组后我先gen coecfo再把每组回归中的cfo相关系数替换到coecfo中,再打算从上图中求mean值,请问有相对简洁的方法吗?
当然第一个问题优先,谢谢了 >_<.


雷达卡




京公网安备 11010802022788号







