Running a power analysis on 9.4 to determine sample size. Comparing a new testing method to a "gold standard" test which is correct 100% of the time on a binary, yes/no outcome. Will accept the new method as "noninferior" if it matches the gold standard 90% of the time. One-sided Alpha = .05 with 90% power.
I'm having difficulty with the coding. I went with what I thought the SAS manual recommended for the above parameters, but it won't give me an N ("ERROR: NTOTAL is not available for TEST=EXACT").
PROC POWER;
ONESAMPLEFREQ
TEST = EXACT
METHOD=EXACT
NULLPROPORTION=.9
PROPORTION = .8 TO .95 BY .01
SIDES = U
POWER = .9
ALPHA = .05
NTOTAL = .;
PLOT X = EFFECT'
RUN;
Any help would be appreciated. Thanks.
Since you are doing one-way noninferiority test,
You should firstly specify a decent MARGIN value in PROC POWER,
And adjust parameter proportion= ,margin= ,ntotal= to get rid of these WARNING message.
proc power;
onesamplefreq test=exact
sides = U
proportion = .82 TO .9 BY .01
nullproportion = 0.9
margin = -0.1
ALPHA = .05
ntotal = 100 to 1000 by 100
power = .;
run;
When SAS tells you it won't do something, such a NTOTALS for TEST=Exact, then it won't.
But sometimes you can approach the problem from the other side. Provide a range of values for NTOTALS and see what the Power is. Refine the lists for those cases of interest. As an example of a starting point.
PROC POWER; ONESAMPLEFREQ TEST = EXACT METHOD=EXACT NULLPROPORTION=.9 PROPORTION = .8 TO .95 BY .01 SIDES = U POWER = . ALPHA = .05 NTOTAL = 100 to 1000 by 100; RUN;
You can see that for proportions under .90 that 1000 is too small.
You also get notes
WARNING: The effect is in the opposite direction from the alternative hypothesis in one of the scenarios in the output table.
actually more than one of the scenarios. Which means you may to reconsider if all of your combinations of NULLPROPORTION and PROPORTION actually make sense.
Play with values of NTOTALS and see how close you get to the power of .9 you can get. And which scenarios NEVER get there.
Thanks!
Thanks. Tried to accept as solution.
Since you are doing one-way noninferiority test,
You should firstly specify a decent MARGIN value in PROC POWER,
And adjust parameter proportion= ,margin= ,ntotal= to get rid of these WARNING message.
proc power;
onesamplefreq test=exact
sides = U
proportion = .82 TO .9 BY .01
nullproportion = 0.9
margin = -0.1
ALPHA = .05
ntotal = 100 to 1000 by 100
power = .;
run;
Thanks. I tried to accept this as a solution.
Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.
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.