SAS新手。有问题请教。先谢过各位!
问题如下。分id计算滚动标准差,对每个date,计入其前两年和本年的数据。
date id num std
1992 a 1 .
1993 a 2 .
1994 a 3 std of num in 1992 1993 1994
1995 a 4 std of num in 1993 1994 1995
1996 a 5 std of num in 1994 1995 1996
1997 a 6 std of...
1998 a 4 std of...
1992 b 1 .
1993 b 2 .
1994 b 3 std of num in 1992 1993 1994
1995 b 4 std of num in 1993 1994 1995
1996 b 1 std of num in 1994 1995 1996
1997 b 2 std of...
......
想了很久,实在是不会,又急着要用,烦请各位大神指教,感激不尽!