I have a table that looks like this and I want a the variable status to be split into two with one variable containing only "1" and the 2nd variable containing "2 and 3"
data have;
input ID Status;
datalines;
1 1
1 3
1 1
1 1
2 1
2 3
2 1
3 1
3 2
;
data want;
set have;
if status = 1 then _1stStatus = Status;
else if Status in (2, 3) then _2ndStatus = Status;
drop Status;
run;