Measures the association between a categorical variable and some continuous and/or categorical variables
catdesc(y, x, weights=rep(1,length(y)), min.phi=NULL,
robust=TRUE, nperm=NULL, distrib="asympt", dec=c(3,3,3,3,1,3))
the categorical variable to describe (must be a factor)
a data frame with continuous and/or categorical variables
an optional numeric vector of weights (by default, a vector of 1 for uniform weights)
for the relationship between y and a categorical variable, only associations higher or equal to min.phi will be displayed. If NULL (default), they are all displayed.
logical. If FALSE, mean and standard deviation are used instead of median and mad. Default is TRUE.
numeric. Number of permutations for the permutation test of independence. If NULL (default), no permutation test is performed.
the null distribution of permutation test of independence can be approximated by its asymptotic distribution ("asympt"
, default) or via Monte Carlo resampling ("approx"
).
vector of 6 integers for number of decimals. The first value if for association measures, the second for permutation p-values, the third for percents, the fourth for phi coefficients, the fifth for medians and mads, the sixth for point biserial correlations. Default is c(3,3,3,3,1,3).
A list of the following items :
associations between y and the variables in x
a list with one element for each level of y
a data frame with categorical variables from x and associations measured by phi
a data frame with continuous variables from x and associations measured by correlation coefficients
Rakotomalala R., 'Comprendre la taille d'effet (effect size)', [http://eric.univ-lyon2.fr/~ricco/cours/slides/effect_size.pdf]
# NOT RUN {
data(Movies)
catdesc(Movies$ArtHouse, Movies[,c("Budget","Genre","Country")])
# }
Run the code above in your browser using DataLab