GDAtools (version 1.5)

assoc.twocat: Bivariate association

Description

Cross-tabulation and measures of association between two categorical variables

Usage

assoc.twocat(x,y,w=rep.int(1,length(x)),na=TRUE)

Arguments

x

the first categorical variable (must be a factor)

y

the second categorical variable (must be a factor)

w

an optional numeric vector of weights (by default, a vector of 1 for uniform weights)

na

logical. If TRUE (default), 'NA' are treated as a category. If FALSE, they are ignored

Value

A list with the following elements :

freq

cross-tabulation

prop

percentages

rprop

raw percentages

cprop

column percentages

v2.cramer

Cramer's V2 between the two variables

phi

the matrix of the phi values for each pair of levels

References

Rakotomalala R., 'Comprendre la taille d'effet (effect size)', http://eric.univ-lyon2.fr/~ricco/cours/slides/effect_size.pdf

See Also

assoc.catcont, condesc, catdesc

Examples

Run this code
# NOT RUN {
data(Music)
assoc.twocat(Music$Jazz,Music$Age)
# }

Run the code above in your browser using DataLab