I need help calculating a sample size in R. I plan to analyse my data with a chi-square test of homogeneity.
Before I do so, I want to calculate a power analysis. I searched for power analysis in R and found the pwr package. But as far as I understand one can only calculate the sample size for the goodness of fit or the associations version of the chi-square test (source: https://cran.r-project.org/web/packages/pwr/vignettes/pwr-vignette.html)
Does anyone know how to calculate the sample size for the homogeneity test?
Hey,
thanks for your answer. I did read the vignette before, and it says that one can calculate the sample size for the goodness of fit test and the associations test.
I, however, am trying to calculate the sample size for a homogeneity test.
Does that difference not matter when calculating the sample size?