全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
1311 5
2013-05-19
悬赏 200 个论坛币 已解决
请问sas中R*C表检验时有哪些参数(如:1.输出理论值;2.每个R*C检验时除了输出卡方值外,还输出 Fisher 精确检验等等),怎样使用,请给出实例,当然如果一一说出大量参数实在麻烦,就请举出:1.输出理论值;2.每个R*C检验时除了输出卡方值外,还输出 Fisher 精确检验,也可以。请高手指点!谢谢!!

最佳答案

yongyitian 查看完整内容

不是很懂, 看看是不是这些 R*C表检验, 一般使用proc freq 的 table 语句。 如 data class; set sashelp.class; if height le 62 then height_group = 'Hight'; else height_group = 'Low'; run; proc freq data=class; table sex*height_group /chisq expected;/* request statistics and to produce the expected values */ table sex*height_group /relrisk; /* rel ...
二维码

扫码加我 拉你入群

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

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

全部回复
2013-5-19 22:15:08
不是很懂, 看看是不是这些

R*C表检验, 一般使用proc freq 的 table 语句。 如

data class;
     set sashelp.class;
         if height le 62 then height_group = 'Hight';
         else height_group = 'Low';
run;
  
proc freq data=class;
   table sex*height_group /chisq expected;/* request statistics and to produce the expected values */
   table sex*height_group /relrisk;             /* relative risk measures including the odds ratio  */
                                                            /* and the column 1 and 2 relative risks */  
   table sex*height_group /trend;              /* requests the Cochran-Armitage test for trend */
   table sex*height_group /RELRISK CMH;   /* request the Cochran-Mantel-Hanzel statistics   */
   table sex*height_group /RELRISK CMH;
run;

斜杠/后面的是选项。
没有指定选项时, 只输出 frequency, percent, row percent, column percent and total count.
不想输出的内容可以在选项中指定,比如下面程序不输出 percent, row percent and column percent.

proc freq data=class;
   table sex*height_group / nopercent norow nocol;
run;

具体用那些选项,根据需要做那些统计分析来确定。

sas文件中给出了各种选项和解释。
http://support.sas.com/documenta ... at_freq_sect010.htm

不确定选项时, 可以先用/all; 查看chisq 及 measure 的结果.

Here is an example   of 2x2 contingency table
http://support.sas.com/documenta ... at_freq_sect029.htm
二维码

扫码加我 拉你入群

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

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

2013-5-20 06:57:41
1. The EXPECTED option of TABLES statement displays the expected frequencies to output, while the OUTEXPECT option adds the expected frequencies to the output dataset.
2. The CHISQ option of the TABLES statement requests a chi-square test, while the FISHER option makes the Fisher's exact test available. Alternatively, you may use the EXACT FISHER statement to demand a Fisher's exact test. Actually, Fisher's exact test is an automatic part of the output with the CHISQ option for 2x2 contingency tables.

I don't expect to get your $200 by the way.
二维码

扫码加我 拉你入群

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

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

2013-5-24 02:17:37
谢谢邓贵大!可否给出实际例子!
二维码

扫码加我 拉你入群

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

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

2013-5-31 23:16:10
谢谢yongyitian!!
二维码

扫码加我 拉你入群

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

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

2013-5-31 23:36:55
谢谢yongyitian!根据您的链接我找到答案了:
proc freq data=class;
   table sex*height_group / Fisher;
run;
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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