Calculate the sample size for a chi-square test of homogeneity

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!

See the vignette for the pwr package

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?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.