Dear everyone,
I estimated the sample size for the AB/BA cross-over trial with PROC POWER.
The code was as follows:
/*Sample code*/;
proc power;
pairedmeans test=equiv_ratio dist=lognormal
meanratio = 1.10
alpha = 0.05
cv = 0.15
corr = 0
lower = 0.8
upper = 1.25
npairs = 2 to 100 by 1
power =. ;
plot min=2 max=100 yopts=(ref=0.8, 0.9 crossref=yes);
run;
I found that the results were not consistent between the output window and the graph.
On the graph, the Number of pairs corresponding to the power of 90% was 25.05.
But, the result on the output window was as follows;
Index N Pairs Power
23 24 0.892
24 25 0.903
25 26 0.913
Which is the more exact result ?
Or, is this just a round-off error ?
I'd appreciate it if someone would help me.
Thanks in advance.
Yasu
Dear Yasu,
I am glad to see your question. The point here I could tell you is that the graph is correct, but this doesn't mean the output window is wrong. In fact, in the output window, the Power is the eact power with the corresponding size can reach. If we round the 25.05, we can get 25, thus from the output window, with size equals to 25, we can get exactly 90.3% power. Hope this can make you clear.
Best regards.
Frankgreen
Dear Frankgreen,
Thank you for your reply.
I almost agree with you, but I don't think that the graph is exact because it is an approximate value.
Please submit the example code below.
Comparing results, you can see that the estimated value on the graph can be affected by the number of values for the parameter, that is, the precision can differ depending on the option.
/*example1*/
proc power;
pairedmeans test=equiv_ratio dist=lognormal
meanratio = 1.10
alpha = 0.05
cv = 0.15
corr = 0
lower = 0.8
upper = 1.25
npairs = 2 to 100 by 1
power =. ;
plot min=2 max=100 yopts=(ref=0.8, 0.9 crossref=yes) ;
run;
/*example2*/
proc power;
pairedmeans test=equiv_ratio dist=lognormal
meanratio = 1.10
alpha = 0.05
cv = 0.15
corr = 0
lower = 0.8
upper = 1.25
npairs = 2 to 100 by 1
power =. ;
plot min=2 max=100 yopts=(ref=0.8, 0.9 crossref=yes) npts=500;
run;
regard,
yasu
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.