Power analysis in [R] for two-way Anova

I am trying to calculate the required sample size for a 2x2 factorial. I have two questions.

1) I am using pwr package and anova one way function to calculate the required sample size using the following code

pwr.anova.test(k = , n = , f = , sig.level = , power = )

      

However, I would like to take a look at the two-way anova, as it is more efficient at evaluating group funds than the one-way anova. There is no two way anova function I could find. Does [R] have a package or subroutine?

2) Also, I am confident in the belief that since I am using anova cardinality unidirectional calculations, the sample size will be more conservative (i.e. large)?

+2


a source to share


2 answers


In a 2 x 2 ANOVA with factor A, factor B, and AxB, you will obtain separate statistical power estimates for each of these three effects.



G Power 3 provides free software and some clear tutorials for estimating the power of effects in factorials: http://www.psycho.uni-duesseldorf.de/abteilungen/aap/gpower3/user-guide-by-design

+2


a source


After searching - I couldn't find a solution for this online.

What I suggest you do (if you know how) is to program this using simulation. If you don't know how to do this, post a SO question on "How can I write a simulation of a two-way anova to get a power analysis" and see what people can help you :)

Alternatively, you can start by looking at the code here:

http://www.rforge.net/doc/packages/NCStats/power.sim.html

To start calculating power through simulation.



Note what Jerome wrote - this power analysis for multiple results.

Interesting plot - I would like to follow it.

Best,

Tal

0


a source







All Articles