- 504
- 1
- 约6.35万字
- 约 41页
- 2021-08-02 发布于湖北
- 举报
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 变量右面有多个变量时,先按第一个变量排序,若第一个变量的观测存在重复时,才按第二个
变量排序。
Q 2
Given the following raw data records in TEXTFILE.TXT:
1
|10|20|30
John,FEB,13,25,14,27,Final
John,MAR,26,17,29,11,23,Current
Tina,FEB,15,18,12,13,Final
Tina,MAR,29,14,19,27,20,Current
The following output is desired:
Obs Name Month Status Week1 Week2 Week3 Week4 Week5
1 John FEB Final $13 $25 $14 $27 .
2 John MAR Current $26 $17 $29 $11 $23
3 Tina FEB Final $15 $18 $12 $13 .
4 Tina MAR Current $29 $14 $19 $27 $20
Which SAS program correctly produces the desired output?
A. data WORK.NUMBERS;
length Name $ 4 Month $ 3 Status $ 7;
infile TEXTFILE.TXT dsd;
input Name $ Month $;
if Month=FEB then input Week1 Week2 Week3 Week4 Status $;
else if Month=MAR then input Week1 Week2 Week3 Week4 Week5 Status $;
format W
您可能关注的文档
最近下载
- 个人简历表格填写2021简历模板.docx VIP
- 针灸推拿学习题库(附答案).docx VIP
- 毕业设计(论文)-五边形凸台零件铣削加工.doc VIP
- 2026届山东省淄博市高三上学期期末考试(摸底质量检测)历史试题(含答案).docx VIP
- 常见词组固定搭配.pdf VIP
- 2023年山东泰安中考地理试题及答案.pdf VIP
- 胎动管理专家共识最新2025.pptx
- (小学综合实践课标复习题全.doc VIP
- 0—3岁婴幼儿心理发展与教育 第四章 0-3岁婴幼儿心理发展与教育 课件PPT.pptx VIP
- 0—3岁婴幼儿心理发展与教育 第三章 0-3岁婴幼儿心理发展与教育 课件PPT.pptx VIP
原创力文档

文档评论(0)