phi.table.Rd
Computes the phi coefficient for every cells of the cross-tabulation between two categorical variables
phi.table(x, y, weights = NULL, na.rm = FALSE, na.value = "NAs", digits = 3)
the first categorical variable
the second categorical variable
numeric vector of weights. If NULL (default), uniform weights (i.e. all equal to 1) are used.
logical, indicating whether NA values should be silently removed before the computation proceeds. If FALSE (default), an additional level is added to the variables (see na.value argument).
character. Name of the level for NA category. Default is "NAs". Only used if na.rm = FALSE.
integer. The number of digits (default is 3). If NULL, the results are not rounded.
A table with the phi coefficients
Rakotomalala R., 'Comprendre la taille d'effet (effect size)', http://eric.univ-lyon2.fr/~ricco/cours/slides/effect_size.pdf
data(Movies)
phi.table(Movies$Country, Movies$ArtHouse)
#> No Yes
#> Europe 0.015 -0.015
#> France -0.405 0.405
#> Other -0.093 0.093
#> USA 0.457 -0.457