由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Statistics版 - SAS Base 123题中47和112题疑问
相关主题
70 题中的第29题答案是不是错了啊?问几道SAS BASE 70题题目,多谢
@@请教用SAS import CSV 文件时遇到的状况SAS help needed!
怎样在data step跳过格式不对的data record?SAS code question
one quick question in SAS, thank you!!求教:What is "SAS data step production"?
请问如何改变 data set's column 位置. 比如name, id 换成id, name.[合集] 请教一个SAS 数据分配问题
一个用R 进行data preparation的问题请推荐SAS book关于Data Step的书--包子酬谢
请问我们平时在SAS里头那种data叫什么format的data呀?问一个SAS DATA 处理的问题,谢谢!
问一个 column-binary data 的问题SAS problem about data step
相关话题的讨论汇总
话题: data话题: array话题: step话题: question话题: sas
进入Statistics版参与讨论
1 (共1页)
t*****s
发帖数: 49
1
****QUESTION 47
Which one of the following statements is true regarding the name of a SAS
array?
A. It is saved with the data set.
B. It can be used in procedures
C. It exists only for the duration of the DATA step
D. It can be the same as the name of a variable in the data set.
Answer: C
我的确没有见过array用于proc step,但不明白为什么不能用呢?(why B is not
true, or say why array can only exist for the duration of the data step?)
****QUESTION 112
The contents of the raw data file SIZE are listed below:
t*****s
发帖数: 49
2
找到了112题以前的讨论(http://www.mitbbs.com/article_t/Statistics/31234679.html), 但不明白这篇上说的“解释是@4 weight 2因为没有一点会被认为是column input跳到第二列" 是什么意思?
d******9
发帖数: 404
3
Hehe.........
****QUESTION 112
input@ 1 height 2.@ 4 weight 2;
Height 2., this is formatted input. However, for Weight 2, the dot is
missing , then the "2" is a column controller, then SAS will read in the value at Column 2 in input buffer for Weight.
I encountered this before, I used the below coding to test it:
data ddtr;
Input @1 ID 2. @4 age 5 ;
cards;
10 567
29 79
38 123
;
run;
Then age= 6, 9, 2 respectively---- all located at Column 5. It appears that , when the period "." is missing in the informat, the number is then a pointer control to control the column.
d******9
发帖数: 404
4
***QUESTION 47
Which one of the following statements is true regarding the name of a SAS
array?
A. It is saved with the data set.
B. It can be used in procedures
C. It exists only for the duration of the DATA step
D. It can be the same as the name of a variable in the data set.
Answer: C
我的确没有见过array用于proc step,但不明白为什么不能用呢?(why B is not
true, or say why array can only exist for the duration of the data step?)
Array is just a grouping of data, not a new dataset. it can not be used in
Proc step.
C. It exists only for the duration of the DATA step
This means:
Data A;
Array Sales (8) V1-V8;
....
...
Run;
When data step A is finished, then Array Sales is gone. If you want to use
it again in the following data step, you have to define it again:
Data B;
Array Sales (8) V1-V8; Note: You will have log errors without this
definition.
....
...
Run;
You got it?????????/
t*****s
发帖数: 49
5
I got it. Thanks so much dido!!!

【在 d******9 的大作中提到】
: ***QUESTION 47
: Which one of the following statements is true regarding the name of a SAS
: array?
: A. It is saved with the data set.
: B. It can be used in procedures
: C. It exists only for the duration of the DATA step
: D. It can be the same as the name of a variable in the data set.
: Answer: C
: 我的确没有见过array用于proc step,但不明白为什么不能用呢?(why B is not
: true, or say why array can only exist for the duration of the data step?)

t*****s
发帖数: 49
6
噢,那就是说 @4把pointer移到column4但没有用到,然后就接下来用column input读
weight了,pointer又回到了column2。明白了。
Thanks so much!

value at Column 2 in input buffer for Weight.

【在 d******9 的大作中提到】
: Hehe.........
: ****QUESTION 112
: input@ 1 height 2.@ 4 weight 2;
: Height 2., this is formatted input. However, for Weight 2, the dot is
: missing , then the "2" is a column controller, then SAS will read in the value at Column 2 in input buffer for Weight.
: I encountered this before, I used the below coding to test it:
: data ddtr;
: Input @1 ID 2. @4 age 5 ;
: cards;
: 10 567

1 (共1页)
进入Statistics版参与讨论
相关主题
SAS problem about data step请问如何改变 data set's column 位置. 比如name, id 换成id, name.
请教SAS advanced中关于view的问题一个用R 进行data preparation的问题
求高人指点一个SAS数据的转换问题请问我们平时在SAS里头那种data叫什么format的data呀?
请问大虾们一个SAS DATA STEP的小问题问一个 column-binary data 的问题
70 题中的第29题答案是不是错了啊?问几道SAS BASE 70题题目,多谢
@@请教用SAS import CSV 文件时遇到的状况SAS help needed!
怎样在data step跳过格式不对的data record?SAS code question
one quick question in SAS, thank you!!求教:What is "SAS data step production"?
相关话题的讨论汇总
话题: data话题: array话题: step话题: question话题: sas