0

first time posting a question here, I appreciate any help you might have.

I am trying to do a two-way ANOVA power analysis in R, and I am trying to use the pwr.2way function from the pwr2 package. I haven't found much help for it online besides the R documentation, but even then, the argument details are not super clear. Specifically, I am confused about the arguments size.A and size.B. I realize from the documentation that it is meant to be the sample size per group in factors A and B respectively, but what exactly does that mean? For instance, in the example code they give, they have:

pwr.2way(a=3, b=3, alpha=0.05, size.A=4, size.B=5, delta.A=4, delta.B=2, sigma.A=2, sigma.B=2)

So theoretically, 3 levels of factor A, 3 levels of factor B, so 9 groups in total. How would we have 4 people in each group for factor A and 5 people for each group for factor B? Does this imply 20 people per group? 9 people per group? I'm confused on how to think about/visualize the arguments to use it for my study design appropriately.

Right now I have the power analysis running by setting size.A = size.B = size of each group, but I don't think that should be right, otherwise why not just make the argument "size" instead of specifying a different size for each factor? If anyone has more experience with this function, I would appreciate any advice!

(Side note: I have also tried the wp.kanova function from the WebPower package which seemed to do the job fine, but I want to try to use this one since it gives more control over different effect sizes for factors A and B.)

  • in case you don't get much help here, Cross Validated might be of some help. I think this question would be on topic there (but I might be wrong) – Mark Sep 01 '23 at 11:18

0 Answers0