Hello,
Using SAS 9.4
I am looking to run a power analysis. I have a total n=34 with 4 groups (n=10 10 10 4). I would like to find the n per group needed for a power of 80% at an alpha of 0.05. Any help would be appreciated. Thank you
What kind of test do you intend to do?
After you set the parameters in Proc Power for the appropriate test and set power=.8 the resulting n is the n for that power pretty much. So "by group" doesn't make much sense in this context.
Power analysis should be done before data collection so you can collect enough records for your design. If you have already collected the data it is kind of late.
Can you show an example of the code you intend to conduct the test?
I'm not sure that Proc Power is going to be that helpful for other than a two sample wilcoxon (hence the statement twosamplewilcoxon in proc power)
Do you know the procedure and options you are going to use to analyze the data?
If not, then it may be too early to talk about power. If so, then show an example of the code. There may be other approaches someone may come up with.
Since most of the actual Wilcoxon analysis is with pairs of data then this question is I think quite relevant. Perhaps your intended analysis might mean the GLMPOWER is more appropriate such as doing ANOVA of some flavor.
Power is tied to analysis, hence the way the statements in proc power are set up.
Please note that the TEST used is a Kruskal-Wallis that uses Wilcoxon Scores. So not actually a Wilcoxon test.
The exact distribution of the Kruskal-Wallis is more than a bit difficult for many sample sizes. So a Chi-square approximation using k-1 degrees of freedom is used, where k is the number of samples.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.