黃河泉 发表于 2019-3-5 16:48 
你若要问程序,永远附上相关资料;若附上资料,永远用 dataex 印出资料。
1. 先 ssc install dataex (并见 ...
好的,谢谢老师!
数据形式如下,“.”代表没有数据,目标是计算standard deviation of the growth rate over a centered rolling five-year period,请问如何用滚动窗口对这样不平衡的面板数据进行计算?
countrycode year GDPgrowth
ABW 1992 .
ABW 1993 .
ABW 1994 .
ABW 1995 -3.32282
ABW 1996 4.08758
ABW 1997 3.85675
ABW 1998 -0.961874
ABW 1999 2.48496
ABW 2000 -2.39133
ABW 2001 -4.31815
ABW 2002 .
ABW 2003 .
ABW 2004 .
ABW 2005 -0.918129
ABW 2006 1.54202
ABW 2007 -4.02394
ABW 2008 -7.0035
AGO 1995 11.553
AGO 1996 10.3482
AGO 1997 4.38289
AGO 1998 1.88663
AGO 1999 -0.672254
AGO 2000 -0.024041
AGO 2001 0.878294
AGO 2002 9.85336
AGO 2003 0.931398
AGO 2004 6.36805
AGO 2005 16.6599
AGO 2006 14.8205
AGO 2007 18.8758
AGO 2008 9.8327
AGO 2009 -1.1756
AGO 2010 -0.175344