BookmarkSubscribeRSS Feed
GS2
Obsidian | Level 7 GS2
Obsidian | Level 7

Using SAS 9.4

 

I used a fisher's exact test with the MC estimation to compare 2 variables (one with 4 categories and 1 binary) so I have a 4x2 table with small cell frequencies. I want to perform a post hoc power analysis (I know it is just the pvalue represented in another way but it is a requirement). My question is what is the syntax for doing so? I previously used the code below for the for a 2 sample but I am cannot find about the 4 sample. 

 

proc power;
twosamplefreq test=fisher
groupproportions= (.07 .01)
alpha=.05
ntotal=.
power=.8;
run;

1 REPLY 1
FreelanceReinh
Jade | Level 19

Hello @GS2,

 

Sorry to see that your question hasn't been answered yet.

 

It appears that this generalization of Fisher's exact test is beyond the scope of PROC POWER. So, you may need to perform a simulation to obtain the power (or sample size) in question. I found a possibly suitable macro TABGENERATION in the NESUG 2007 paper "An Algorithm to Compute Exact Power of an Unordered RxC Contingency Table". I haven't checked the technical details and in a quick test on two 2x2 tables it produced different results (by only a few percentage points, though) than PROC POWER, but this doesn't mean that they are wrong. PROC POWER uses a different approximation ("continuity-adjusted arcsine test", see documentation), so the macro (whose processing time is much longer) might even be more accurate. You may want to check if it meets your requirements, in particular regarding the specific alternative hypothesis for which you want to compute the test's power.

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
  • 1 reply
  • 1213 views
  • 0 likes
  • 2 in conversation