The first "M" array gets the average of all numeric variables in the dataset. There's a total of 74 variables: X,Y,Z,V,P,L...etc However, I would like to get the average of only that last 6 variables, i.e. from 69 - 74th variable. I tried creating another array "L" where I identified the do statement to start from (i=69 to i+5). The average function does not work still. Any help? data XXX; Set YYYY; array M(*) _numeric_; do i=1 to dim(M); TOTAVG=mean(of M(*)); drop i; end; array L(*) _numeric_; i=69; do n=i to i+5; AVG2=mean(of L[n]); end; run;
... View more