Given the following IF/THEN statement:
If Age NE 16 and Age NE 15 then Group=1;
Which assignment statement for variable Group is functionally equivalent to the original statement used in the above data step?
Given the following IF/THEN statement:
If Age NE 16 and Age NE 15 then Group=1;
Which assignment statement for variable Group is functionally equivalent to the original statement used in the above data step?
The original IF/THEN statement assigns Group=1 if Age is not equal to 15 and not equal to 16. The functionally equivalent assignment statement for variable Group would check if Age is not in the set {15, 16}. Therefore, the correct answer is 'if Age not in(15,16) then Group=1;' which precisely matches the condition described in the original statement.
the answer is D
Correct Answer is : if Age not in(15,16) then Group=1; else Group=2;