SAS Base, A00-211 Crambible 

SAS 베이스 자격증


QUESTION NO: 90

The following SAS program is submitted: 


proc format;
value score
1 - 50 = 'Fail'

51 - 100 = 'Pass';
run;

proc freq data=WORK.COURSES ; 

table Exam;
format Exam score.;
run;


The variable Exam has a value of 50.5.

How will the Exam variable value be displayed in the FREQ procedure output?

A. Fail
B. Pass
C. 50.5
D. . (missing numeric value)


proc format 즉, score의 format을 다음처럼 지정합니다. 1~50 값은 Fail로, 51~100은 Pass로 정의해줍니다. 


work라이브러리에 있는 courses라는 데이터의 proc freq라고 빈도를 조회하려고 하는데요. table Exam을 출력할때, 이때 score를 그 위에 지정한 포맷을 사용하려고 합니다. 이때 score. 뒤에 period 즉, . 이 들어가야합니다. 


그런데 Exam변수의 값을 보니 50.5 입니다. 이 수치는 포맷 적용이 안되겠죠. 왜냐하면 50.5는 Fail과  Pass 사이에 들어가게되고 이건 정의를 해준게 아니니깐요. 이렇게 만족하지 않을때는 그냥 값 그대로 나오게 됩니다. 


Answer: C 


반응형

+ Recent posts