BookmarkSubscribeRSS Feed
Yasu
Fluorite | Level 6

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

1 REPLY 1
SteveDenham
Jade | Level 19

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

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is ANOVA?

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.

Discussion stats
  • 1 reply
  • 1281 views
  • 4 likes
  • 2 in conversation