Hi guys,
I know it should be a super easy question but I cannot get the results.
ID Var
1001
1002
1003
1004
1005
1006
1007
.....
I would like to select observations whose IDs are 1001, 1004,1012 and 1043. These IDs are not selected following a pattern but randomly. I tried the code below but it did not work.
data want;
set have;
if ID = '1001';
if ID = '1004';
if ID = '1012';
if ID = '1043';
run;
what code do I need to use? thanks!