Hello,
I need to programm the following:
RSK | NKM |
BR | 0 | 1 |
<= 1,6 | A+ | A+ |
<= 2,6 | A | A+ |
<= 3 | B | A+ |
<= 3,4 | C | A+ |
<= 3,6 | C | A |
<= 3,8 | C | A |
<= 4 | C | B |
<= 4,2 | D | C |
<= 4,6 | D | D |
> 4,6 | X | X |
BR values are in the 1st column
NKM values are in the 2nd line, column 2 and 3.
The result is RSK and is given in the matrix (BR, NKM).
For instance: BR <= 4 and NKM = 0 is RSK = C.
I started in the proc sql step with the code:
(case
when BR = . and NKM = 0 then '??'
when BR <= 1.6 and NKM = 0 then 'A+'
when BR <= 2.6 and NKM = 0 then 'A '
when BR <= 3.0 and NKM = 0 then 'B '
when BR <= 3.6 and NKM = 0 then 'C '
when BR <= 4.2 and NKM = 0 then 'D '
when BR > 4.2 and NKM = 0 then 'X '
else '??' end) as RSK,
but it doesn't work properly. In Addition, I have to programm the case and NKM = 1, with different values of BR as in the table.
What is the right way to do?