# compare Cohen's h and phi coefficient as effect sizes for comparing proportions library(effectsize) # test data (have to be contingency tables; one column is always the same) matrices <- lapply(1:999, function(i) matrix(c(i, 1000-i, 999, 1), ncol = 2)) phis <- sapply(matrices, function(x) effectsize::phi(x)$phi) hs <- sapply(matrices, function(x) effectsize::cohens_h(x)$Cohens_h) plot(abs(hs), phis, type = "l")