cohenH | R Documentation |
Calculates Cohen's h for 2 x 2 contingency tables, such as those that might be analyzed with a chi-square test of association.
cohenH(x, observation = "row", verbose = TRUE, digits = 3)
x |
A 2 x 2 contingency table. |
observation |
If |
verbose |
If |
digits |
The number of significant digits in the output. |
Cohen's h is an effect size to compare two proportions. For a 2 x 2 table: Cohen's h equals Phi2 - Phi1, where, If observations are in rows, P1 = a/(a+b) and P2 = c/(c+d). If observations are in columns, P1 = a/(a+c) and P2 = b/(b+d). Phi = 2 * asin(sqrt(P))
A single statistic.
Salvatore Mangiafico, mangiafico@njaes.rutgers.edu
https://rcompanion.org/handbook/H_10.html
cohenG
data(Pennsylvania18)
Pennsylvania18
cohenH(Pennsylvania18, observation="row")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.