nerdexam
SAS_Institute

A00-280 · Question #3

Given the following data set DEMOG: SITE PATID DOB SEXCD RACECD TRTMENT 1 1 11/25/1946 1 1 1 1 2 11/01/1974 1 1 2 1 3 10/13/1949 1 1 1 1 4 09/01/1968 2 1 2 1 10 05/24/1999 2 1 1 2 1 03/15/1974 1 1 2…

The correct answer is B. If if site eq 1 then sexcd = 2 ; else if site eq 2 then sexcd = 1. See the full explanation below for the reasoning.

Question

Given the following data set DEMOG: SITE PATID DOB SEXCD RACECD TRTMENT 1 1 11/25/1946 1 1 1 1 2 11/01/1974 1 1 2 1 3 10/13/1949 1 1 1 1 4 09/01/1968 2 1 2 1 10 05/24/1999 2 1 1 2 1 03/15/1974 1 1 2 2 2 01/04/1983 2 1 2 2 3 12/04/1983 1 2 1 2 4 12/28/1976 1 9 2 2 5 10/04/1958 1 1 1 2 10 07/05/1969 1 1 2 Which selection below would be considered hard-coding?

Options

  • Aif sexcd eq 1 then sex = "Male"; else if sexcd eq 2 then sex = "Female";
  • BIf if site eq 1 then sexcd = 2 ; else if site eq 2 then sexcd = 1 ;
  • Cif site eq 1 and sexcd ne 2 then check = 1 ; else if site eq 2 and sexcd ne 1 then check = 2 ;
  • Dbirthdt = input(dob, mmddyy10.);

How the community answered

(45 responses)
  • A
    2% (1)
  • B
    82% (37)
  • C
    11% (5)
  • D
    4% (2)

Community Discussion

No community discussion yet for this question.

Full A00-280 Practice