I think we are close to solution!! after running this code observation length increased from 9K to 30K. data example;
109 set keep;
110 do RaceBlack= 0,1;
111 do RaceAsian= 0,1;
112 do RaceNativeAm= 0,1;
113 do RacNativePacefic= 0,1;
114 do RaceOther= 0,1;
115 if sum(RaceBlack,RaceAsian,RaceNativeAm,RacNativePacefic,RaceOther)>1 then Race=4;
116 else if RaceBlack then race=2;
117 else if RaceAsian then race=3;
118 else if RaceNativeAm or RacNativePacefic then race=4;
119 else if RaceOther then race=1;
120 output;
121 end;
122 end;
123 end;
124 end;
125 end;
126 label
127 RaceBlack='Black'
128 RaceAsian='Asian'
129 RaceNativeAm='AI/AN'
130 RacNativePacific='NHOPI'
131 RaceOther='White or Other'
132 end;
133 run;
NOTE: Numeric values have been converted to character values at the places given by:
(Line):(Column).
110:18 110:20 111:18 111:20 112:21 112:23 114:18 114:20
NOTE: Character values have been converted to numeric values at the places given by:
(Line):(Column).
115:14 115:24 115:34 115:64 116:15 117:15 118:16 119:15
NOTE: There were 9546 observations read from the data set WORK.KEEP.
NOTE: The data set WORK.EXAMPLE has 305472 observations and 50 variables.
NOTE: DATA statement used (Total process time):
real time 0.65 seconds
cpu time 0.32 seconds
... View more