SAS macro if then condition compare variable with numeric value
问题 I have a data set that include several paths and the last variable is the frequency of the people following the path. data path; input path1 path2 path3 path4 path5 path6 frequency; cards; 2 5 3 6 7 2 465 4 3 2 3 0 0 20394 2 1 3 6 5 0 309 1 3 2 6 5 3 302 2 2 5 4 7 7 6783 ; run; I would like to calculate the frequency from the former stop to the latter stop along each path to count their individual frequency. since there are 7 stops. there will be 49 combinations, so I wrote a macro code.