- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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)
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
data have;
input ID side $ group $ rom;
cards;
1 left A 144
1 left B 144
1 left C 144
1 right A 129
1 right B 129
1 right C 129
2 left A 100
2 left B 100
2 left C 100
2 left D 100
2 right A 120
2 right B 120
2 right C 120
2 right D 120
;
run;
proc npar1way data = have wilcoxon;
class group;
var rom;
OUTPUT OUT= KW_PVALS (KEEP=_VAR_ P_KW);
RUN;
PROC PRINT DATA = KW_PVALS;
RUN;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.