BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
SAS-questioner
Obsidian | Level 7

I tried to conduct power analysis by using chi-square test, and the sample size for each group is 111 with power of .8 and alpha level of .05. But I think the sample per group is still too large, I want to reduce the sample size a little bit without compromising the power, so I conducted non-inferiority and tried if I can reduce the sample size. I used the below code:

proc power;
	twosamplefreq test=fm
		nullproportiondiff=-0.15 -0.10
		refproportion=0.45
		proportiondiff=-0.18
		sides = U
		alpha=0.01 0.05
		npergroup=.
		power=0.8;
	run;

However, the outcome is invalid, I am not sure what's going on here. I saw a warning 

WARNING: The effect is in the opposite direction from the alternative hypothesis in 4 scenarios in the output table.

Could you help me with it? Or is there some other ways to reduce the sample size without reducing the power? Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions
jiltao
SAS Super FREQ

You might find the following usage note helpful --

http://support.sas.com/kb/48616

So if you wanted an upper-sided test, you might want to specify a positive value for proportiondiff. For example --

proc power;
	twosamplefreq test=fm
		nullproportiondiff=-0.15 -0.10
		refproportion=0.45
		proportiondiff=0.18
		sides = U
		alpha=0.01 0.05
		npergroup=.
		power=0.8;
	run;

If you want to have the same power but smaller sample size, then your assumed proportion difference needs to be bigger, or the margin size needs to be bigger. For example, either one of the following programs should give you a smaller sample size --

proc power;
	twosamplefreq test=fm
		nullproportiondiff=-0.15 -0.10
		refproportion=0.45
		proportiondiff=0.28
		sides = U
		alpha=0.01 0.05
		npergroup=.
		power=0.8;
	run;

or

proc power;
	twosamplefreq test=fm
		nullproportiondiff=-0.25 -0.20
		refproportion=0.45
		proportiondiff=0.18
		sides = U
		alpha=0.01 0.05
		npergroup=.
		power=0.8;
	run; 

 Hope this helps,

Jill

View solution in original post

2 REPLIES 2
ballardw
Super User

What about the original code that gave you the sample size of 111?

 

I would start with that and try reducing the sample size and see the resulting power.

 

Also, warnings are not errors. Sometimes the tell you that you may be pushing a particular set of options/parameters just a bit far. Sometimes these warnings are a reminder to double check what you set. You might find that you typed .10 when you intended .01 (for something completely made up and not related to your problem) though I did see an alpha= 0.5 one time instead of 0.05 and the question was why is the sample so small (don't think  that was on this forum though)

 

I would take this a time to consider the signs of your diff parameters.

jiltao
SAS Super FREQ

You might find the following usage note helpful --

http://support.sas.com/kb/48616

So if you wanted an upper-sided test, you might want to specify a positive value for proportiondiff. For example --

proc power;
	twosamplefreq test=fm
		nullproportiondiff=-0.15 -0.10
		refproportion=0.45
		proportiondiff=0.18
		sides = U
		alpha=0.01 0.05
		npergroup=.
		power=0.8;
	run;

If you want to have the same power but smaller sample size, then your assumed proportion difference needs to be bigger, or the margin size needs to be bigger. For example, either one of the following programs should give you a smaller sample size --

proc power;
	twosamplefreq test=fm
		nullproportiondiff=-0.15 -0.10
		refproportion=0.45
		proportiondiff=0.28
		sides = U
		alpha=0.01 0.05
		npergroup=.
		power=0.8;
	run;

or

proc power;
	twosamplefreq test=fm
		nullproportiondiff=-0.25 -0.20
		refproportion=0.45
		proportiondiff=0.18
		sides = U
		alpha=0.01 0.05
		npergroup=.
		power=0.8;
	run; 

 Hope this helps,

Jill

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 2 replies
  • 385 views
  • 3 likes
  • 3 in conversation