- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.