When comparing the independent variables between two groups of one variable, I am would like to calculate the effect size. But I wonder if Cohen's effect size should only be applied to continuous variables? (At least I found that the effsize package only support a continuous variable)

How about categorical variables? I can obtain a p-value from the chi square test, but what method should I use to estimate the effect size?


2 Answers 2


I prefer the phi coefficient. It is also generalized for r x s table not only 2 x 2. Run the chi square test of independence and write down the value of the test statistics $\chi^2$. Then

$$ \phi = \sqrt{\frac{\chi^2}{n}} $$

where $n$ is your sample size. It is interpreted in the similar fashion as Pearson correlation coefficient.

  • 2
    $\begingroup$ Thank you. I also found Cramer’s V is an extension of phi coefficient, and is calculated as V = SQRT(X2/n*df); where X2 is the chi-sqaure statistic, n is sample size, df = min(nrow – 1, ncol – 1) and nrow = number of rows and ncol = number of columns in the contingency table. $\endgroup$
    – cyrusjan
    Jul 10, 2017 at 13:51
  • $\begingroup$ When generalized to two-way tables with dimensions larger than 2x2, this effect size is called Cohen's $\omega$. See en.wikipedia.org/w/… $\endgroup$
    – J-J-J
    Sep 7, 2023 at 17:22

If you are working with a 2x2 table, then you may use the odds ratio or the phi coefficient as measures of effect size. When at least one of the variables has more than two levels, Cramer's V is often used.

Details for these (and other measures of effect size for categorical variables) may be found at: https://en.wikipedia.org/wiki/Effect_size#Categorical_family:_Effect_sizes_for_associations_among_categorical_variables


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.