全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
30870 13
2010-08-09
悬赏 100 个论坛币 已解决
如题:
总数  失败数  估计失败率(%,95% CI)
347       7            2.02(0.96-4.23)

code该如何写?

最佳答案

jingju11 查看完整内容

Contrast Estimate Results Mean Mean L'Beta Standard Label Estimate Confidence Limits Estimate Error Alpha rate 0.0202 0.0096 0.0423 -3.9034 0.3780 0.05 Exp(rate) 0.0202 0.0076 0.05 Co ...
二维码

扫码加我 拉你入群

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

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

全部回复
2010-8-9 22:58:46
复制代码
Contrast Estimate Results
                 Mean            Mean                         L'Beta          Standard
Label        Estimate      Confidence Limits     Estimate       Error      Alpha
rate           0.0202         0.0096      0.0423     -3.9034         0.3780      0.05
Exp(rate)                                                        0.0202          0.0076     0.05
                Contrast Estimate Results
                    L'Beta                       Chi-
Label          Confidence Limits     Square    Pr > ChiSq
rate             -4.6442     -3.1626    106.66        <.0001
Exp(rate)     0.0096      0.0423

but I dont think this is exact poisson regression either, while you can count on SAS 9.22 for the newly implemented Exact method in Genmod
二维码

扫码加我 拉你入群

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

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

2010-8-10 04:07:50
data a;
r=7/347;
r_low = cinv(0.025, 2*7)/(2*347);
r_up = cinv(0.975, 2*(7+1))/(2*347);
run;

It is easy if you use R:

poisson.test(7,347)
二维码

扫码加我 拉你入群

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

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

2010-8-10 07:02:48
data a;
r=7/347;z=probit(0.975);
deta=z*sqrt((z/347)**2+4*r/347);
b=2*r+z**2/347;
up=(b+deta)/2;
lo=(b-deta)/2;
proc print;run;
二维码

扫码加我 拉你入群

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

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

2010-8-10 11:06:20
harlon1976 发表于 2010-8-10 07:02
data a;
r=7/347;z=probit(0.975);
deta=z*sqrt((z/347)**2+4*r/347);
b=2*r+z**2/347;
up=(b+deta)/2;
lo=(b-deta)/2;
proc print;run;
这是正态近似法计算,结果为:95%CI(0.9771942-4.1644),
与想要的结果还有点差距。能否用exact poisson distribution计算呢?
二维码

扫码加我 拉你入群

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

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

2010-8-10 11:09:49
marloneusa 发表于 2010-8-10 04:07
data a;
r=7/347;
r_low = cinv(0.025, 2*7)/(2*347);
r_up = cinv(0.975, 2*(7+1))/(2*347);
run;

It is easy if you use R:

poisson.test(7,347)
The CINV function returns the pth quantile from the chi-square distribution with degrees of freedom df and a noncentrality parameter nc. The probability that an observation from a chi-square distribution is less than or equal to the returned quantile is p. This function accepts a noninteger degrees of freedom parameter df.
If the optional parameter nc is not specified or has the value 0, the quantile from the central chi-square distribution is returned. The noncentrality parameter nc is defined such that if X is a normal random variable with mean and variance 1, X2 has a noncentral chi-square distribution with df=1 and nc = 2.
CAUTION: For large values of nc, the algorithm could fail; in that case, a missing value is returned.   
Note:   CINV is the inverse of the PROBCHI function.  
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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