t+3
Σgik
k=t
----------------------- copy starting from the next line -----------------------
- * Example generated by -dataex-. To install: ssc install dataex
- clear
- input str4 id float(year gdp)
- "1" 1991 2
- "1" 1992 3
- "1" 1993 5
- "1" 1994 6
- "1" 1995 7
- "2" 1993 9
- "2" 1994 9
- "3" 1993 5
- "3" 1994 7
- "3" 1995 6
- "3" 1996 7
- "3" 1997 8
- "3" 1998 8
- "4" 1991 3
- "4" 1992 5
- "4" 1993 6
- "4" 1994 8
- end
------------------ copy up to and including the previous line ------------------
问题1:想把从1991或任意一年开始,每一个ID每3年的GDP求和再平均;
问题2:因为是非平衡面板,所以有的数据长度不够3年,能否让不足3年的ID有几年数据就按几年计算均值?
先感谢各位老师花时间看我的问题了!


雷达卡







京公网安备 11010802022788号







