I'm fairly new to SAS, (I mainly use R, Python, and VBA) and I am looking for a way to loop through the rows of a SAS data set. Essentially, the R equivalent would be:
my_vector = c()
for(k in 1:10) {
if(k > 1 & k < 10) {
my_vector[k-1] = mean(df[(k-1):(k+1), 1])
{
}
My main goal is to create an MA filter to estimate trend (I could do my homework in R, but I'm trying to learn SAS better).
Or, another solution would be to convert a specific row of a SAS data set into an array from PROC IML but I can't figure out how to get the column converted into an array.
Any help would be greatly appreciated.