由买买提看人间百态

topics

全部话题 - 话题: inemp
(共0页)
C******t
发帖数: 72
1
39:data work.empsalary;
set work.people (in = inemp)
work.money(in = insal);
run;
In the set work.empsalary, each observation comes from either people or
money. Therefore, inemp and insal can not be true at the same time.
if insal and inemp; =>false
for example;
people:
x y
1 2
salary:
x y
3 4
empsalary:
x y inemp insal
1 2 1 0
3 4 0 1
Alternatively, if we change the question to:
set work.people (in = inemp);
work.money(in = insal);
run;
The SAS data set WORK.PEOPLE has 5 observation
h***x
发帖数: 586
2
来自主题: Statistics版 - in =option的一道题
'set a b;' will appends obs from b to the end of a,
if there was no 'if insal and inemp',
there would be 12 obs. 5 from inemp and 7 from insal
Since there is no intersection between these 5 and 7, so the final dataset
has zero obs if 'if insal and inemp' applys.
o******6
发帖数: 538
3
来自主题: Statistics版 - [合集] 请教sas base 123中几题
☆─────────────────────────────────────☆
jessie31 (jessie024) 于 (Sun Mar 1 01:01:56 2009) 提到:
16 data work.empsalary;
set work.people(in=inemp);
work.money(in=insal);
if insal and inemp;
run;
The data set work.people has 5 obs, and the data set work.money has 7
observations.
How many obs will the data set work.empsalary contain?
A.0
B.5
C.7
D.12
Why the answer is A.
The default value for inemp and insal is 0?
73.
data work.test;
First='Ipswich, England';
City_Country=substr(Firs
y********0
发帖数: 638
4
来自主题: Statistics版 - 请问base(123题)的第16题
查一下in=的意思就知道了.
if insal and inemp 是说the new obs can be found in both the datasets.
但是set a b只是简单的concatenate ,就是两个数据接起来.永远都是
insal=1,inemp=0 或者insal=0,inemp=1组合.

money
z*********o
发帖数: 541
5
来自主题: Statistics版 - in =option的一道题
The following SAS program is submitted:
data work.empsalary;
set work.people (in = inemp)
work.money (in = insal);
if insal and inemp;
run;
The SAS data set WORK.PEOPLE has 5 observations, and the data set
WORK.MONEY has 7 observations.
How many observations will the data set WORK.EMPSALARY contain?
A. 0
B. 5
C. 7
D. 12
Answer: A
答案为啥是A呢?能不能帮忙解释一下
d*******1
发帖数: 293
6
来自主题: Statistics版 - Ask a SAS Base question?
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.
g*******t
发帖数: 124
7
来自主题: Statistics版 - 问一个sas的问题1
The following SAS program is submitted:
data work.empsalary;
set work.people (in = inemp)
work.money (in = insal);
if insal and inemp;
run;
The SAS data set WORK.PEOPLE has 5 observations, and the data set WORK.MONEY
has 7 observations.
How many observations will the data set WORK.EMPSALARY contain?
A. 0
B. 5
C. 7
D. 12
=>The answer is A, I ran SAS and it is A. I don't understand. For concanetin
g data, isn't everything in the combined data file? Why isn't it 12?
s*******2
发帖数: 791
8
The following SAS program is submitted:
data work.empsalary;
set work.people (in = inemp)
work.money(in = insal);
if insal and inemp;
run;
The SAS data set WORK.PEOPLE has 5 observations, and the data set WORK.MONEY
has 7 observations.
How many observations will the data set WORK.EMPSALARY contain?
A. 0
B. 5
C. 7
D. 12
Answer: A
为什么? 我觉得 BCD都有可能呀。
QUESTION 72
The following SAS program is submitted:
data work.test;
First = 'Ipswich, England';
City = substr(First,1,7);
City_Country= City!!'; '!!'E
o****n
发帖数: 281
9
来自主题: Statistics版 - 求教 SAS base 123 Q 16
有个问题一直没有想明白,请大仙们帮助:
the following SAS program is submitted:
data work.empsalary;
set work.people(in = inemp)
work.money(in = insal);
if insal and inemp;
run;
The SAS dataset work.people has 5 observations, and the dataset work.money
has 7 observations. How many observations will the dataset work.empsalary
contain?
答案是0,我想如果people和money这两个datasets有共同的observations,结果应该是
一个非零的数(不大于5)对吧?是说一定要有一个by statement才行?
o****n
发帖数: 281
10
来自主题: Statistics版 - 求教 SAS base 123 Q 16
啊?为什么可能是12?
if insal and inemp 这个表示的是两个dataset共有的observations被subset出来把?
我觉得最多的obs个数是max(insal, inemp)...
b******s
发帖数: 345
11
来自主题: Statistics版 - 请问base(123题)的第16题
The following SAS program is submitted:
data work.empsalary;
set work.people(in=inemp) work.money(in=insal);
if insal and inemp;
run;
The SAS data set work.people has 5 observations, and the data set work.money
has 7 observations.
How many observations will the data set work.empsalary contain?
A. 0
B. 5
C. 7
D. 12
Answer: A
我怎么觉得是D啊,请知道正确答案的讲解下,谢谢!!!
i**********a
发帖数: 32
12
来自主题: Statistics版 - 请教SAS 123题中的17, 57, 68, 72题
马上就要考试了,base 123题中还有几题没有弄清楚,希望能得到大家的解答。谢谢!
17. The contents of two SAS data sets named EMPLOYEE and SALARY are listed
below:
EMPLOYEE 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
为什么选B?
57. The SAS data set name... 阅读全帖
d*******1
发帖数: 293
13
来自主题: Statistics版 - Ask a SAS Base question?
If there is no condition, it should be 4.
Why it is 4 since there is a condition: if inemp and insal;
s******r
发帖数: 1524
14
来自主题: Statistics版 - 请问base(123题)的第16题
set work.people(in=inemp) work.money(in=insal);
by XXXXXX;
baozi

money
(共0页)