Programming the statistical procedures from SAS

Sample size estimation with PROC POWER

Reply
Contributor
Posts: 25

Sample size estimation with PROC POWER

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

Frequent Contributor
Posts: 87

Re: Sample size estimation with PROC POWER

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

Contributor
Posts: 25

Re: Sample size estimation with PROC POWER

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

Ask a Question
Discussion stats
  • 2 replies
  • 233 views
  • 3 likes
  • 2 in conversation