SAS_Institute
A00-280 · Question #98
Given the following partial output data set: SUBJID VISIT AGE AGECAT 101 1 20 2 103 1 42 3 105 1 19 2 106 1 56 3 107 1 55 3 Which code was used to create AGECAT?
The correct answer is D. If age <=18 then AGECAT=1; else if 18<AGE<=40 then AGECAT=2; else AGECAT=3. See the full explanation below for the reasoning.
Question
Given the following partial output data set:
SUBJID VISIT AGE AGECAT
101 1 20 2
103 1 42 3
105 1 19 2
106 1 56 3
107 1 55 3
Which code was used to create AGECAT?
Options
- AIf age <18 then AGECAT=1; if 18<=AGE<=40 then AGECAT=2;
- Belse AGECAT=3; if age <=18 then do AGECAT=1; else if 18<AGE<=40 then do AGECAT=2; else do AGECAT=3;
- CIf age <18 then AGECAT=1; else if 18<=AGE<40 then AGECAT=2; else AGECAT=3;
- DIf age <=18 then AGECAT=1; else if 18<AGE<=40 then AGECAT=2; else AGECAT=3;
How the community answered
(60 responses)- A15% (9)
- B3% (2)
- C7% (4)
- D75% (45)
Community Discussion
No community discussion yet for this question.