stdres.table.Rd
Computes standardized or adjusted residuals of a (possibly) weighted contingency table
stdres.table(x, y, weights = NULL, na.rm = FALSE,
na.value = "NAs", digits = 3, residuals = "std")
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.
If "std" (default), standardized (i.e. Pearson) residuals are computed. If "adj", adjusted standardized residuals are computed.
A table with the residuals
The adjusted standardized residuals are strictly equivalent to test-values for nominal variables as proposed by Lebart et al (1984).
Agresti, A. (2007). An Introduction to Categorical Data Analysis, 2nd ed. New York: John Wiley & Sons.
Rakotomalala R., Comprendre la taille d'effet (effect size), http://eric.univ-lyon2.fr/~ricco/cours/slides/effect_size.pdf
Lebart L., Morineau A. and Warwick K., 1984, *Multivariate Descriptive Statistical Analysis*, John Wiley and sons, New-York.
data(Movies)
stdres.table(Movies$Country, Movies$ArtHouse)
#> No Yes
#> Europe 0.327 -0.337
#> France -5.612 5.772
#> Other -2.014 2.072
#> USA 8.445 -8.685