I am trying to find a way to calculate a moving average using SAS do loops. I am having difficulty. I essentially want to calculate a 4 unit moving average. 

```
DATA data;
   INPUT a b;
   CARDS;
1 2
3 4 
5 6 
7 8 
9 10
11 12
13 14
15 16
17 18
;
run;    

data test(drop = i);
   set data;
   retain c 0;
   do i = 1 to _n_-4;
      c = (c+a)/4;
   end;
run;

proc print data = test;
run;

```