I have vector A. How can i create vector B with the same size of vector A where starting row 13 in B I compute the average of the previous 12 observations in A. In other words
I tried a loop and it is taking forever. I feel it could be done easily without a loop.