Hi, I am struggling to generate different groups in proc means. I am trying to generate weekly average temperature groups using id variable and IN operator, and then get their average of each group. I developed the following syntax, but something is wrong. Could someone help me find what the mistake is? thank you. This is my syntax : proc means data= id80_00_20a; where id (in (1,2,3,4,5,6, 7))=1; where id (in (8,9,10,11,12,13,14, 15))=2 ; where id (in (16,17,18,19,20,21,22,23))=3; where id (in (24,25,26,27,28,29,30, 31))=4; class id; var avg1 avg2 avg3 ; run; This is what the log page says: 1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK; 72 73 proc means data= id80_00_20a; 74 where id (in (1,2,3,4,5,6, 7))=1; ERROR: Function IN requires a character expression as argument 1. 75 where id (in (8,9,10,11,12,13,14, 15))=2 ; ERROR: Function IN requires a character expression as argument 1. 76 where id (in (16,17,18,19,20,21,22,23))=3; ERROR: Function IN requires a character expression as argument 1. 77 where id (in (24,25,26,27,28,29,30, 31))=4; ERROR: Function IN requires a character expression as argument 1. 78 class id; 79 var avg1 avg2 avg3 ; 80 run;
... View more