开发者

Power Analysis in [R] for Two-Way Anova [closed]

Closed. This question is off-topic. It is not currently accepting answers.

Want to improve this question? Update the question so it's on-topic for Stack Overflow.

Closed 12 years ago.

开发者_Go百科 Improve this question

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

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

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

However, I would like to look at two way anova, since this is more efficient at estimating group means than one way anova. There is no two-way anova function that I could find. Is there a package or routine in [R] to do this?

2) Moreover, am I safe in assuming that since I am using a one-way anova power calculations, that the sample size will be more conservative (i.e. larger)?


In a 2 x 2 ANOVA involving Factor A, Factor B, and AxB, you will get separate statistical power estimates for each of these three effects.

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


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

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

Also, you could start by reviewing the code here:

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

For a start on power calculation through simulation.

Notice what Jeromy wrote - this power analysis is for multiple outcomes.

Interesting subject - I'd love to followup on it.

Best,

Tal

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜