SAS Base, A00-211 Crambible 

SAS 베이스 자격증 


QUESTION NO: 56

The following SAS program is submitted: 


data test;

set sasuser.employees;
if 2 le years_service le 10 then
amount = 1000;
else amount = 0;
amount_per_year = years_service / amount run;


What is the value of the variable AMOUNT_PER_YEAR if an employee has been with the company for one year?


A. 0
B. 0.001
C. 1
D. . (missing numeric value)


test라는 데이타를 만들려고 하는데요. sasuse 라이브러리에 있는 employees데이타를 set으로 불러옵니다. if 구문에서 years_service라는 변수가 2부터 10까지의 값에 있으면 amount에 1000을 할당하라는 뜻입니다. 그게 아니면 0을 할당하게 되는데요. 


문제에서 years_service 가 1이되었으니까 amount 값은 0이되고,  years_service / amount 을 계산하려고 하니 계산할 수 없으므로 missing value 가 결과값으로 나오게 됩니다. 


Answer: D 


반응형

+ Recent posts