楼主: Huallage
3985 4

还想请教一下大家sas base123题的112和50题里面的41题区别 [推广有奖]

  • 0关注
  • 1粉丝

大专生

31%

还不是VIP/贵宾

-

威望
0
论坛币
70 个
通用积分
0
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
15743 点
帖子
32
精华
0
在线时间
39 小时
注册时间
2009-9-2
最后登录
2016-3-6

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
123题的41:
The contents of the raw data file SIZE are listed below:
--------10-------20-------30
72 95
The following SAS program is submitted:
data test;
infile 'size';
input @1 height 2. @4 weight 2;
run;
Which one of the following is the value of the variable WEIGHT in the output data set?
A. 2
B. 72
C. 95
D. . (missing numeric value)

50题的41:
A raw data file is listed below.
1---+------10---+----20---+---
01/05/1989      Frank      11
12/25/1987      June       13
01/05/1991      Sally        9
The following SAS program is submitted using the raw data file as input:
data work.family;
    infile 'file-specification';
    input @1 data_of_birth mmddyy10.
            @15 first_name $5.
            @25 age 3;
run;
proc print data=work.family noobs;
run;
Which one of the following is the result?
a. The program executes, but the age values are missing in the output.
b. The program executes, but the date values are missing in the output.
c. The program fails to execute because the age informat is coded incorrectly.
d. The program fails to execute because the date informat is coded incorrectly.

看答案,123题的第112题选A。50题的41题选A
我没看出来这两道题的区别在哪里。都是没有. , 但为什么一个的output是常数2,另一个就是missing。我也run了一下,结果确实如此,只是不明白。
请明白人帮着解答一下。谢谢
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:SAS base Base following correctly informat following contents file

input statement里面 变量后面的数字就是对应的column 第一题weight 后面的2 对应第二栏 也就是72中的2

而第二题 age后面的3 对应第三栏是 / 因为age是numeric varible无法识别特殊符号 所以是missing
已有 1 人评分论坛币 热心指数 收起 理由
admin_kefu + 20 + 5 热心帮助其他会员

总评分: 论坛币 + 20  热心指数 + 5   查看全部评分

使用道具

藤椅
teqel 发表于 2015-9-13 05:32:30 来自手机 |只看作者 |坛友微信交流群
sas那个石家庄人 发表于 2015-9-13 05:23
input statement里面 变量后面的数字就是对应的column 第一题weight 后面的2 对应第二栏 也就是72中的2

...
这个很有意思啊

使用道具

板凳
Huallage 发表于 2015-9-14 00:44:20 |只看作者 |坛友微信交流群
sas那个石家庄人 发表于 2015-9-13 05:23
input statement里面 变量后面的数字就是对应的column 第一题weight 后面的2 对应第二栏 也就是72中的2

...
太谢谢了!

使用道具

报纸
ccutyuyu 发表于 2017-12-15 11:12:18 |只看作者 |坛友微信交流群
所以在按列输入下@符号没有用了是吗

使用道具

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-4-28 22:05