全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
1344 1
2017-08-07
data CHNDATA;
input date  IMEXSUM        KOREER        FINANCESAVING        CHNREER        GOVERNINCOME        GOVERNEXPEND        ENTERPROFIT        GDPQUARTERLY        DOMESTICONSU        STOCKVALUE;
informat date yymm5.;
format date yymm5.;

lnimex=log(IMEXSUM);
lncnreer=log(CHNREER);
lnfs=log(financesaving);
lngi=log(governincome);
lnge=log(governexpend);
lnep=log(enterprofit);
lngq=log(gdpquarterly);
lndc=log(domesticonsu);
lnsk=log(stockvalue);
cards;
19951        548.53        120.26        111727.52        75.11        1027.4        1029.11        4660.1        12111.7        4660.1        3806.08
19952        715.84        119.24        120203.5        74.86        1484.78        1484.3        4783.8        14612.9        4783.8        3694.47
程序运行后如下:data CHNDATA;
924  input date  IMEXSUM KOREER  FINANCESAVING   CHNREER GOVERNINCOME    GOVERNEXPEND    ENTERPROFIT
924! GDPQUARTERLY    DOMESTICONSU    STOCKVALUE;
925  informat date yymm5.;
                   ------
                   48
ERROR 48-59: The informat YYMM was not found or could not be loaded.

926  format date yymm5.;
927
928  lnimex=log(IMEXSUM);
929  lncnreer=log(CHNREER);
930  lnfs=log(financesaving);
931  lngi=log(governincome);
932  lnge=log(governexpend);
933  lnep=log(enterprofit);
934  lngq=log(gdpquarterly);
935  lndc=log(domesticonsu);
936  lnsk=log(stockvalue);
937  cards;

NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.CHNDATA may be incomplete.  When this step was stopped there were 0
         observations and 20 variables.
WARNING: Data set WORK.CHNDATA was not replaced because this step was stopped.
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.01 seconds

1027  ; RUN;
为什么时间格式输入不对呀?


二维码

扫码加我 拉你入群

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

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

全部回复
2017-8-7 10:12:01

The YYMMw. format writes SAS date values in the form <yy>yyMmm, where
<yy>yy
is a two-digit or four-digit integer that represents the year.

M
is the character separator to indicate that the number of the month follows..

mm
is an integer that represents the month.

所以你要用yymm5.来表示1995年一月,应该是95M01。


二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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