阅读权限 255 威望 0 级论坛币 88 个 通用积分 2.1142 学术水平 182 点 热心指数 178 点 信用等级 166 点 经验 9462 点 帖子 296 精华 0 在线时间 335 小时 注册时间 2009-6-17 最后登录 2014-9-20
沙发
邓贵大
发表于 2013-10-18 09:23:03
data a;
input a b c d;
XPL_FISH = cdf('hyper', a, a+b+c+d, a+b, a+c);
XPR_FISH = 1-cdf('hyper', a-1, a+b+c+d, a+b, a+c);
if a/(a+b)<c/(c+d) then do;
p = pdf('hyper', a, a+b+c+d, a+b, a+c);
do e=c to 0 by -1;
p1 = pdf('hyper', e, a+b+c+d, c+d, a+c);
if p1<p then leave;
end;
XP2_FISH = XPL_FISH + cdf('hyper', e, a+b+c+d, c+d, a+c);
end;
else do;
p = pdf('hyper', c, a+b+c+d, c+d, a+c);
do e=a to 0 by -1;
p1 = pdf('hyper', e, a+b+c+d, a+b, a+c);
if p1<p then leave;
end;
XP2_FISH = XPR_FISH + cdf('hyper', e, a+b+c+d, a+b, a+c);
end;
cards;
12 132 9 78
11 4 2 6
;
run; 复制代码
总评分: 经验 + 100
论坛币 + 100
学术水平 + 10
热心指数 + 10
信用等级 + 10
查看全部评分
Be still, my soul: the hour is hastening on
When we shall be forever with the Lord.
When disappointment, grief and fear are gone,
Sorrow forgot, love's purest joys restored.