Answer the question
In order to leave comments, you need to log in
How to interpret and calculate arguments between.var and within.var in a function for power analysis of one-way ANOVA power.anova?
Hello! I want to understand how to correctly interpret and calculate the arguments between.var and within.var in the power.anova.test (r language) function for power analysis of one-way ANOVA. The documentation says that this is between group variance and within group variance. Are we talking about the sums of squares SSB and SSW? Or about MSB = SSB/(k-1) and MSW = SSW/(nk)?
Now I calculate them as MSB and MSW. I get between.var = 387.1 and within.var = 339, resulting in power = 0.9851467. It seems to me that this is clearly an erroneous assessment. I ask you to reasonably confirm or refute my guesses about the need to use SSB and SSW.
The fact is that I work with pilot data in the form of A / B test results. I need to perform a power analysis for 1-way ANOVA using the power.anova.test function from R. The code is attached:
X <- c(41.9,16.0,84.0,56.0,0.0,0.0,33.0,33.4,26.0,13.0,23.0,34.0,26.0,25.0,56.0,30.0,21.7,21.0,36.5,24.0,21.8,5.5,34.0,11.0,10.0,23.0,11.5,46.2,21.7,20.1,64.0,14.0)
F <- c(rep('f1',16) , rep('f2',16))
av <- unlist(summary(aov(X ~ F)))
b_var <- av['Mean Sq1']
w_var <- av['Mean Sq2']
power.anova.test(
groups = 2,
n = 16,
between.var = b_var,
within.var = w_var,
sig.level = 0.05)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question