Programming the statistical procedures from SAS

Plot statement in Proc Power

Reply
Contributor
Posts: 25

Plot statement in Proc Power

Hi,

Now I'm trying to draw a graph for the samplsize analysis with plot statement in power procedure,

and I find that the resut differss depending on the option of plot statement.

The SAS code is as follows:

/*PRG1*/
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.9 crossref=yes);
run;

/*PRG2*/
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=20 max=50 yopts=(ref=0.9 crossref=yes);
run;

/*PRG3*/
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.9 crossref=yes) NPTS=1000;
run;

Where does the difference come from?

Does the precision of estimation differ depending on the option?

I'd appreciate it if someone would help me.

Yasu

Respected Advisor
Posts: 2,655

Plot statement in Proc Power

I think it all comes down to the granularity of the interpolation, so yes the precision differs depending on the option.  Rather than NPTS=, you might specify STEP= in the plot statement, for spacing on the X-axis for the interpolation.

Steve Denham

Ask a Question
Discussion stats
  • 1 reply
  • 128 views
  • 4 likes
  • 2 in conversation