/**********************************************************************/ data _power_; /* On the following line, enter an estimate of the overall */ /* success probability (p=), the test's significance level */ /* (level=), the alternative hypothesis specified as the */ /* difference between p1 and p2 (diff=), and the minimum */ /* (nmin=) and maximum (nmax=) sample sizes to be considered. */ */ p=.3; level=.05; diff=.12; nmin=10; nmax=1000; /* Compute power */ /* Create macro variables for output labeling. */ call symput('p',trim(left(p))); call symput('level',trim(left(level))); call symput('diff',trim(left(diff))); /* Select 'nice' range of total sample sizes. */ diforder=10**(max(floor(log10(nmax-nmin+1e-8)),1)-1); normlen=(nmax-nmin)/diforder; step=diforder*((normlen<=20)+2*(20