由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Statistics版 - [求助]Base SAS123 几道题39,72,73,75,76,79,93
相关主题
请问base(123题)的第16题请教SAS 123题中的17, 57, 68, 72题
in =option的一道题再问三个关于length的问题,谢谢
Ask a SAS Base question?请教一个sas123问题
问一个sas的问题1SAS123题之64和50题之37居然题目相同,答案不同!
求教 SAS base 123 Q 16a question about length assignment
[合集] 请教sas base 123中几题another sas question
SAS BASE的一道题不明白,青椒新人报道,兼问SAS data set的问题
SAS base string question还问道SAS的题目
相关话题的讨论汇总
话题: inemp话题: insal话题: sas话题: set话题: data
进入Statistics版参与讨论
1 (共1页)
s*******2
发帖数: 791
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
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
a****g
发帖数: 480
2
Answer for Question 73:
Putting strings together is called concatenation. For example, if you have
separate variables representing a first and last name, you can concatenate
them (with a blank in between) to create a variable containing the full name.
The concatenation operator, || (or !!), has always been available to SAS
programmers. For example, if One = ABC and Two = DEF, then One || Two is
equal to ABCDEF.
When you use the || operator, if you do not define the length of the
resulting string
s*******2
发帖数: 791
3
Thanks.
The question 72,73,75,76 are solved. How about the Q79? why the length of
Product_Number is 8 and the length of Item is 4 , but the length of Item||'/
'||Product_Number is 17?
How about Q39 and Q93?
Many thanks.

name.

【在 a****g 的大作中提到】
: Answer for Question 73:
: Putting strings together is called concatenation. For example, if you have
: separate variables representing a first and last name, you can concatenate
: them (with a blank in between) to create a variable containing the full name.
: The concatenation operator, || (or !!), has always been available to SAS
: programmers. For example, if One = ABC and Two = DEF, then One || Two is
: equal to ABCDEF.
: When you use the || operator, if you do not define the length of the
: resulting string

g*******y
发帖数: 380
4
Check out the attachment, which is I found online when I was preparing for
the base exam. You can learn most of character functions which appear in the
practice exam.
For the question 93, you can't answer it unless you see the display.

'/

【在 s*******2 的大作中提到】
: Thanks.
: The question 72,73,75,76 are solved. How about the Q79? why the length of
: Product_Number is 8 and the length of Item is 4 , but the length of Item||'/
: '||Product_Number is 17?
: How about Q39 and Q93?
: Many thanks.
:
: name.

s*******2
发帖数: 791
5
Thanks so much.

the

【在 g*******y 的大作中提到】
: Check out the attachment, which is I found online when I was preparing for
: the base exam. You can learn most of character functions which appear in the
: practice exam.
: For the question 93, you can't answer it unless you see the display.
:
: '/

s*******2
发帖数: 791
6
39: 我想是考察 invalid data
C******t
发帖数: 72
7
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
s*******2
发帖数: 791
8
感谢ColdPitt回答问题, 但是有两点要修正:
1。 ColdPitt回答的是16题
2。 最后你的假设题目,答案应该是5+7=12 observations

【在 C******t 的大作中提到】
: 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 (共1页)
进入Statistics版参与讨论
相关主题
还问道SAS的题目求教 SAS base 123 Q 16
SAS base question[合集] 请教sas base 123中几题
请问SPSS 或者 SAS中变量名的变换 AABB - BBAASAS BASE的一道题不明白,青椒
也贡献一个电面经验SAS base string question
请问base(123题)的第16题请教SAS 123题中的17, 57, 68, 72题
in =option的一道题再问三个关于length的问题,谢谢
Ask a SAS Base question?请教一个sas123问题
问一个sas的问题1SAS123题之64和50题之37居然题目相同,答案不同!
相关话题的讨论汇总
话题: inemp话题: insal话题: sas话题: set话题: data