由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Statistics版 - Ask a SAS Base question?
相关主题
请问base(123题)的第16题a SAS question in base 70
求教 SAS base 123 Q 16SAS sampling的问题
in =option的一道题[合集] 请教sas base 123中几题
问一个sas的问题1A SAS problem
[求助]Base SAS123 几道题39,72,73,75,76,79,93[合集] SAS里如何实现LOCF(LAST OBS CARRIED FORWARD)?
SAS base questionI also have a SAS question.
请教SAS 123题中的17, 57, 68, 72题求问一道SAS adv 题
请教SAS BASE 70题里的第35题SAS应用问题
相关话题的讨论汇总
话题: sas话题: bruce话题: dan话题: inemp话题: insal
进入Statistics版参与讨论
1 (共1页)
d*******1
发帖数: 293
1
Two sas data set: EMPLOYEE and SALARY
name age name salary
Bruce 30 Bruce 40000
Dan 35 Bruce 35000
Dan 37000
Dan.
The following SAS program is submitted:
data work.empsalary;
merge work. employee (in = inemp)
work.salary (in = insal);
by name;
if inemp and insal;
run;
How many observations will the data set WORK.EMPSALARY contain?
A. 2
B. 4
C.5
D. 6
Answer: B
It looks like the answer is A, why B, that is strange.
a*z
发帖数: 294
2
Check the attachment.

【在 d*******1 的大作中提到】
: Two sas data set: EMPLOYEE and SALARY
: name age name salary
: Bruce 30 Bruce 40000
: Dan 35 Bruce 35000
: Dan 37000
: Dan.
: The following SAS program is submitted:
: data work.empsalary;
: merge work. employee (in = inemp)
: work.salary (in = insal);

d*******1
发帖数: 293
3
If there is no condition, it should be 4.
Why it is 4 since there is a condition: if inemp and insal;
s********s
发帖数: 252
4
因为salary这个dataset中的每一个record都是以BRUCE或者DAN为名字,所以每一条都
可以被merge,不存在多余的observation,所以家不加in 这个option没有区别。
同样道理实用于employee 这个dataset,加不加in没有区别。
1 (共1页)
进入Statistics版参与讨论
相关主题
SAS应用问题[求助]Base SAS123 几道题39,72,73,75,76,79,93
[提问]怎样提取SAS Dateset的observation number?SAS base question
[SAS] data set options (obs=) in output tables请教SAS 123题中的17, 57, 68, 72题
SAS QUESTION:how to capture the last nonmissing observation?请教SAS BASE 70题里的第35题
请问base(123题)的第16题a SAS question in base 70
求教 SAS base 123 Q 16SAS sampling的问题
in =option的一道题[合集] 请教sas base 123中几题
问一个sas的问题1A SAS problem
相关话题的讨论汇总
话题: sas话题: bruce话题: dan话题: inemp话题: insal