Hello, I try to do a rolling window. I have this program. data rolling(keep=grp id a b) / view=rolling; do grp = 0 to nbid-9; do j = 1 + grp to 9 + grp; set test nobs=nbid point=j; output; end; end; stop; run; My data have the form id a b 1 1 8,00 1 2 6,00 1 3 5,00 1 4 3,33 1 5 1,83 1 6 0,33 1 7 -1,17 1 8 -2,67 1 9 -4,17 1 10 -5,67 I want to create a rolling window with 9 obsevations by id. Result id a b 1 1 8,00 1 2 6,00 1 3 5,00 1 4 3,33 1 5 1,83 1 6 0,33 1 7 -1,17 1 8 -2,67 1 9 -4,17 1 2 6,00 1 3 5,00 1 4 3,33 1 5 1,83 1 6 0,33 1 7 -1,17 1 8 -2,67 1 9 -4,17 1 10 -5,67 In attachement you can find the data. My program do not work well with different id. It work well when I have just one id. I need help?
... View more