全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
1358 3
2015-05-16
做sas base题目时遇到这样一个问题,实在搞不清楚,请各位指点迷经。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 date_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?

Correct answer:
Values for the variable age are missing in the output because the informat for age is
coded incorrectly. Since age is standard numeric input, it should use the w.d informat to
specify a field width of 3 in the INPUT statement.

没搞明白什么意思,哪位高手给指点一下


二维码

扫码加我 拉你入群

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

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

全部回复
2015-5-16 12:35:52
age变量读入格式不对呀,后面没有点,应该是@25 age 3.;
二维码

扫码加我 拉你入群

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

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

2015-5-16 12:49:38
加上点用sas读了一下,根本读不出来age的值啊
二维码

扫码加我 拉你入群

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

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

2015-5-16 13:14:03
奋斗者497911813 发表于 2015-5-16 12:49
加上点用sas读了一下,根本读不出来age的值啊
按列读,要求数据是标准格式,你检验下数据长度,读入age时,是从25列开始,如果按照上面的25列是没有数据的
二维码

扫码加我 拉你入群

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

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

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群