全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
2379 1
2011-06-27
悬赏 300 个论坛币 未解决
我有如下程序,目的是为了对R*2列联表的线性趋势做出检验,但是运行后老是出错,还望高手指点!谢谢高手赐教!
程序的资料来源:
为了研究某种混合物的致癌性,将60只大鼠随机分为四组,分别接受100mg200mg300mg400mg剂量的该化合物饲料喂养,随访观察1年以后观察其肿瘤发生情况,实验数据见下表,欲考察肿瘤的发生率是否随着剂量水平的变化而呈现线性趋势。




                                                   60
只大鼠肿瘤发生情况


化合物剂量                                例数   
             肿瘤发生情况     未发生           发生       合计
100mg                                                12                        3               15
200mg                                               10                        5                15
300mg                                                9                         6                15
400mg                                                5                       10                15                  
合计                        36                      24                 60

程序如下:
   

data prg15_1;



do dose=1 to   4;
       do response=0   to  1;
           input f@@;

         output;

        end;

end;

cards;


  12       3
        10       5

  9         6

  5       10

;

run;

proc  freq data=prg15_1;

tables dose*response/trend  norow  nocol   nopercent

scores = table;

weight f;

exact trend;

ods html;

run;


运行上述的程序后,在log窗口出现的信息如下:

NOTE: SAS initialization used:



real time  1.85 seconds


cpu time   1.49 seconds



1   data prg15_1;


2    do dose=1 to 4;


3     do response=0 to 1;


4      input f@@;


5      output;


6     end;


7     end;


8    cards;



NOTE: SAS went to a new line when INPUT statement reached past the end of a line.


NOTE: The data set WORK.PRG15_1 has 8 observations and 3 variables.


NOTE: DATA statement used (Total process time):



real time    0.04 seconds



cpu time     0.04 seconds




13    ;


14    run;



15




16   proc freq data=prg15_1;


17  tables dose*response/trend norow nocol  nopercent


18   scores = table;


19   weight f;


20   exact trend;


21   ods html;


NOTE: Writing HTML Body file: sashtml.htm


22   run;







ERROR: Windows Error Reporting failed because the client was not found.


ERROR:
Read Access Violation In Task [ FREQ ]


Exception occurred at (08151D0F)


Task Traceback


Address
Frame

(DBGHELP API Version 4.0 rev 5)


08151D0F
0786D1DC
sasfre7:mcn_main+0xD0F


08151C7D
0786D208
sasfre7:mcn_main+0xC7D


08151B5F
0786D588
sasfre7:mcn_main+0xB5F


08157CC8
0786D5FC
sasfre7:mcn_main+0x6CC8


6689824A
0786D688
sasoda:mcn_main+0x1724A


66881C49
0786D7C8
sasoda:mcn_main+0xC49


0806310C
0786DAB8
sasmono:mcn_main+0x210C


66F7AB38
0786DC0C
sasods:mcn_main+0x79B38


66F348A4
0786DFB0
sasods:mcn_main+0x338A4


652F39ED
0786E6F4
sasfreq:mcn_main+0x329ED


652F131A
0786ED40
sasfreq:mcn_main+0x3031A


652CD159
0786F858
sasfreq:mcn_main+0xC159


652C32F5
0786FF8C
sasfreq:mcn_main+0x22F5


015F27C8
0786FFA0
sashost:Main+0xC204


016DD038
0786FFB4
sashost:Main+0xF6A74


7C80B729
0786FFEC
kernel32:GetModuleFileNameA+0x1BA




NOTE: The SAS System stopped processing this step because of errors.


ERROR: Integer divide by zero.


NOTE: There were 8 observations read from the data set WORK.PRG15_1.


NOTE: PROCEDURE FREQ used (Total process time):



real time  0.31 seconds



cpu time   0.28 seconds


二维码

扫码加我 拉你入群

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

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

全部回复
2011-6-28 08:38:17
你的程序在我的电脑上能正确运行,是软件的问题!我的是9.2版的,网上那个portal SAS 9.13运行也没问题!
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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