S********a 发帖数: 359 | 1 请教个sample size calculation for logistic reg的问题,predictor是PM(25%的人
是在exposure下,trial的个数我自己写了个1000), outcome 是MI(4个人里有一个人
是MI,所以P=0.25,trial的个数也是自己写的1000),我想看sample size 要多少才可
以significantly odd ratio>1.
proc power;
logistic
vardist("pm")=binomial(0.25, 1000)
vardist("MI")=binomial(0.25, 1000)
testpredictor="MI"
responseprob=0.25
testoddsratio=1
alpha=0.05
power=0.8
ntotal=.;
plot y=power min=0.01 max=0.99 yopts=(ref=0.8 crossref=yes) vary(symbol);
run;
结果:出错了
WARNING: The magnitude of the effect is zero in one of the scenarios in the
output table.
WARNING: Power is less than alpha in one of the scenarios in the plot.
WARNING: The magnitude of the effect is zero in 19 scenarios in the plot.
ERROR: No valid data to plot.
我的code哪里有问题呢?谢谢 | P****D 发帖数: 11146 | 2 In this option you need to give a reasonable odds ratio for the predictor.
It can be anything but 1.
Also testpredictor="pm".
【在 S********a 的大作中提到】 : 请教个sample size calculation for logistic reg的问题,predictor是PM(25%的人 : 是在exposure下,trial的个数我自己写了个1000), outcome 是MI(4个人里有一个人 : 是MI,所以P=0.25,trial的个数也是自己写的1000),我想看sample size 要多少才可 : 以significantly odd ratio>1. : proc power; : logistic : vardist("pm")=binomial(0.25, 1000) : vardist("MI")=binomial(0.25, 1000) : testpredictor="MI" : responseprob=0.25
| S********a 发帖数: 359 | 3 谢谢发呆MM,包子已发!
【在 P****D 的大作中提到】 : In this option you need to give a reasonable odds ratio for the predictor. : It can be anything but 1. : Also testpredictor="pm".
|
|