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 


반응형

SAS Base, A00-211 Crambible 

SAS 베이스 자격증 


QUESTION NO: 55


The following SAS program is submitted: 


data one;
date = '04juI2005'd;
format date weekdate.; 

run;


proc print data = one; 

run;


What output is generated?

A. Obs date 1 Monday, July 4, 2005 

B. Obs date 1 July4, 2005
C. Obs date 1 04Jul2005
D. Obs date 1 Monday, 07/04/2005


데이타 one을 만드는데, date 값이 할당되었고요. 이 date를 weekdate의 format으로 지정했습니다. weekdate의 포맷을 알면 되겠죠. 


Monday, July 4, 2005 로 표현되어서 A입니다. (weekdate default 값입니다.)


그밖에 예를들어~ 

weekdate3.   결과값은 Mon

weekdate6.   결과값은 Monday

weekdate17. Monday, July 4, 2005

weekdate21. Monday, July 4, 2005



Answer: A 


반응형

SAS Base, A00-211 Crambible 

SAS 베이스 자격증 


QUESTION NO: 54

Read the table Table of region by product region product Frequency Percent Row Pct Col Pct corn cotton oranges Total EAST 2 1 1 4 






The following SAS program is submitted: 


proc freq data = sales;
<insert TABLES statement here>
run;


The following output is created by the FREQUENCY procedure: 


The FREQ Procedure
Table of region by product
region product

Frequency
Percent
Row Pct
Col Pct corn cotton oranges Total


EAST 2 1 1 4

22.22 11.11 11.11 44.44

50.00 25.00 25.00

50.00 33.33 50.00 SOUTH 2 2 1 5 22.22 22.22 11.11 55.56

40.00 40.00 20.00
50.00 66.67 50.00 Total 4 3 2 9 4444 33.33 22.22 100.00


Which TABLES statement(s) completed the program and produced the output?


A. tables region product;
B. tables region * product;
C. tables product * region;
D. tables product; tables region;




TABLES 행*열 형태로 넣어줘야하고요. 결과값 이미지를 보면 테이블 위에 힌트가 있습니다. Region 과 Product가 있어서 답은 B가 됩니다. 


Answer: B 


반응형

SAS Base, A00-211 Crambible 

SAS 베이스 자격증 


QUESTION NO: 53

The following SAS program is submitted: 


data work.test;
array items{3} _temporary_;  오류입니다. 아래처럼 바꿔주세요. 

array items{3} _temporary_(1, 2, 3);
run;


What are the names of the variable(s) in the WORKTEST data set?


A. ITEMS
B. ITEMS1, ITEMS2, ITEMS3
C. No variables are created because it is a temporary array. 

D. The program fails to execute because there are no variables listed on the ARRAY statement.


items라는 이름을 가진 길이 3의 array를 만들려고 하는데요. 이를 _temporary_ 이렇게 임시적으로 할당을 합니다. 즉 데이터에 출력이 안됩니다. 그냥 중간 계산 용도로만 필요해서 이를 사용하게 됩니다. 


Answer: C 



반응형

SAS Base, A00-211 Crambible 

SAS 베이스 자격증 


QUESTION NO: 52

The following SAS program is submitted: 


Data_null_;
set old;
put sales 1 sales2;

run;



Where is the output written?

A. to the SAS log
B. to the SAS data set _NULL_
C. to the SAS output window or to an output file
D. to the raw data file that was most recently opened


데이타 이름이 특이한데요. _null_ 보통 특수문자는 안되지만 _ null_(under bar)는 가능합니다. 즉, set old...이런 내용으로 진행하고 싶은데 다만 이걸 데이터 셋으로 지정하고 싶지 않을때, 단지 output window에서 결과물을 보는게 아니라 log창으로 결과물을 보고싶을때 사용합니다. 


Answer: A 


반응형

+ Recent posts