# Can I calculate Cohen's effect size for categorical variable?

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?

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.