SAS-Base认证考试(70真题+答案详解).pdf
- tianya189企业认证 |
- 2021-08-02 发布|
- 365.66 KB|
- 41页
SAS Base认证考试 —70 题
SAS分多个认证种类: base,advanced , clinic 等,但大多需要先通过 base 认证。
但凡这类商业组织提供的考证,基本都是题库型,所以想考过难度并不大。
对于只想拿 SAS认证的人,如果熟练掌握网上流传甚广的 sas 真题 70 题,通过 base 认证基本就没问题。
Q 1
1. The following SAS program is submitted:
data WORK.TOTAL;
set WORK.SALARY;
by Department Gender;
if First.<_insert_code_> then Payroll=0; Payroll+Wagerate;
if Last.<_insert_code_>;
run;
The SAS data set WORK.SALARY is currently ordered by Gender within Department.
Which inserted code will accumulate subtotals for each Gender within Department?
A. Gender
B. Department
C. Gender Department
D. Department Gender
答案: A
本题知识点:自动变量
在 SAS读取数据时,在 PDV 过程中会产生很多自动变量,在输出的数据集中是不可见的。 FIRST.VARIABLE· :同一个 BY变量(组),若新的变量值第一次出现时,其 first.variable 值为 1 。 LAST.VARIABLE· :同一个 BY 变量(组),若新的变量值最后一次出现时,其 last.variable 值为 1。
另外,在 BY 变量右