/* 该程序为两组均数比较的参数估计 */
proc power;
/* 以下为参数,结尾不能加分号,切记。课写在一行中间用一个值数个分号隔开 */
twosamplemeans /* 该参数表示两组均数比较 */
groupmeans =8.06|7.23 /* 两组均数分别为8.06 7.23 */
stddev =1.68 /* 标准差为1.68 */
power =0.8 /* 把握度为0.8 */
/* 下一句为过程须有分号 */
ntotal = .; /* 表示估计样本含量n total */
run;
/* 两分类变量率的比较*/ proc power; twosamplefreq /* 表示两样本率的比较 */ groupproportions =(0.71 0.83) /* 两样本率分别为0.71 0.83 */ power =0.8 ntotal =.; run;