全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
13640 6
2007-04-30

Integer divide by zero.

运行proc时出现上面的错误,是什么意思,请高手指教!

二维码

扫码加我 拉你入群

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

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

全部回复
2007-11-20 09:00:00

同问,请各位大侠不吝赐教

二维码

扫码加我 拉你入群

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

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

2007-11-20 09:15:00
整数被零除 ?
二维码

扫码加我 拉你入群

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

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

2007-11-20 09:37:00

我找到问题的所在了,我的那个数据是利用ststatransfer 软件将spss的数据导成sas格式的,我一对它进行排序,log里就出现了上面的error,你把它用set语句重新转换成sas数据库就行了,

data tmp1.a2;
set tmp1.a1;
run;

二维码

扫码加我 拉你入群

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

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

2007-11-20 11:16:00

阿,我也遇到过这个问题,感谢阿!

将spss的数据存储成sas的数据格式,排序经常遇见这问题!

二维码

扫码加我 拉你入群

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

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

2015-5-30 10:10:30
Why do I get an "Integer Divide by Zero" error when using a SAS data file?

Please Note! The problem described here only applies to Stat/Transfer Version 7 and earlier. This problem has been remedied in Stat/Transfer Version 8 and above.

Say that you used Stat/Transfer to make a SAS data file called c:\mydata\hartman.sas7bdat and you go to use it in a statistics procedure (in our example, proc reg) like below

proc reg data="c:\mydata\hartman";
  model y = time cond;
run;
and you get the following error in the log file.

NOTE: PROCEDURE REG used:
      real time           0.00 seconds
      cpu time            0.00 seconds

ERROR: Integer divide by zero.
NOTE: The SAS System stopped processing this step because of errors.
20   proc reg data="c:\mydata\hartman";
21     model y = time|cond;
22   run;
23
What went wrong?  Sometimes Stat/Transfer may make a SAS file that SAS has trouble reading in a statistical procedure, but there is a workaround.  You can make a copy of the data file in SAS (because SAS can read the file in a data step) and then use the copy.  For example,

data hartman;
  set "c:\mydata\hartman";
run;

proc reg data=hartman;
  model y = time cond;
run;
and then the log file shows that this worked,

72   data hartman;
73     set "c:\mydata\hartman";
74   run;

NOTE: There were 9 observations read from the data set c:\mydata\hartman.
NOTE: The data set WORK.HARTMAN has 9 observations and 3 variables.
NOTE: DATA statement used:
      real time           0.00 seconds
      cpu time            0.00 seconds


75
76   proc reg data=hartman;
77     model y = time cond;
78   run;

NOTE: 9 observations read.
NOTE: 1 observations have missing values.
NOTE: 8 observations used in computations.
79   quit;

NOTE: PROCEDURE REG used:
      real time           0.02 seconds
      cpu time            0.02 seconds
Now everything looks good and you can proceed to analyze the copy of your data file.
二维码

扫码加我 拉你入群

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

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

点击查看更多内容…
相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

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