一.公式法
data A;
alpha = 0.05;
z_a = quantile("Normal",
0.025);
z_b = quantile("Normal", 0.1);
cr1=0.5*log((1+0.9)/(1-0.9));
cr2=0.5*log((1+0.95)/(1-0.95));
n=(z_a+z_b)**2/(cr1-cr2)**2+3;
run;
但需要注意单双侧的Z值有所不同。
data A;
alpha = 0.05;
zLeft = quantile("Normal", 0.05);
zLeft1 = quantile("Normal", 0.1);
zRight = quantile("Normal", 0.975);
zRight1 = quantile("Normal", 0.9);run;
二.基于power的sas code
proc power;
onecorr dist=fisherz
nullcorr = 0.9
corr = 0.95
ntotal = .
power = 0.9;run;
三.PASS软件样本量
基于以上三种方法,样本量一致。