Power analysis for unbalanced one-way ANOVA

I am trying to calculate power analysis (using the pwr package in R ) for an unbalanced one-way ANOVA . I am not sure how to weigh the funds correctly or take into account the unbalanced design. I currently have:

 groups = 4 

n = n for each group (here n1 = 12 for group 1, n2 = 8 for group 2, n3 = 9, for group 3 and n4 = 12)

between.var and within.var known from ANOVA analysis:

 (between.var=0.004363, within.var=0.003680) 

And finally

means = (0.1513, 0.1767, 0.1676, 0.1968).

Any help would be appreciated.

+5
source share
1 answer

Work with weighted tools is described here: https://www.r-bloggers.com/r-tutorial-series-two-way-anova-with-unequal-sample-sizes/

 #read the dataset into an R variable using the read.csv(file) function dataTwoWayUnequalSample <- read.csv("dataset_ANOVA_TwoWayUnequalSample.csv") #display the data dataTwoWayUnequalSample 

The data is as follows:

The data in the example

The code for weighted means:

#use anova (object) to execute ANOVA SS type I

 #environment ANOVA anova(lm(math ~ environment * instruction, dataTwoWayUnequalSample)) #instruction ANOVA anova(lm(math ~ instruction * environment, dataTwoWayUnequalSample)) 

The output of the code, taken from the web-page

0
source

All Articles