Hey everyone,

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?

Thanks for your help!