Measures the association between a categorical variable and some continuous and/or categorical variables
catdesc(y, x, weights = NULL,
na.rm.cat = FALSE, na.value.cat = "NA", na.rm.cont = FALSE,
measure = "phi", limit = NULL, correlation = "kendall", robust = TRUE,
nperm = NULL, distrib = "asympt", digits = 2)A list of the following items :
associations between y and the variables in x
a list with one element for each level of y
Each element in bylevel has the following items :
a data frame with categorical variables from x and local associations
a data frame with continuous variables from x and associations measured by correlation coefficients
the categorical variable to describe (must be a factor)
a data frame with continuous and/or categorical variables
numeric vector of weights. If NULL (default), uniform weights (i.e. all equal to 1) are used.
logical, indicating whether NA values in the categorical variables should be silently removed before the computation proceeds. If FALSE (default), an additional level is added to the categorical variables (see na.value.cat argument).
character. Name of the level for NA category. Default is "NA". Only used if na.rm.cat = FALSE.
logical, indicating whether NA values in the continuous variables should be silently removed before the computation proceeds. Default is FALSE.
character. The measure of local association between categories of categorical variables. Can be "phi" for phi coefficient (default), "or" for odds ratios, "std.residuals" for standardized (i.e. Pearson) residuals, "adj.residuals" for adjusted standardized residuals or "pem" for local percentages of maximum deviation from independence.
for the relationship between y and a categorical variable, only associations higher or equal to limit will be displayed. If NULL (default), they are all displayed.
character. The type of measure of correlation measure to use between two continuous variables : "pearson", "spearman" or "kendall" (default).
logical. If TRUE (default), median and mad are used instead of mean and standard deviation.
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").
numeric. Number of digits for mean, median, standard deviation and mad. Default is 2.
Nicolas Robette
Rakotomalala R., 'Comprendre la taille d'effet (effect size)', [http://eric.univ-lyon2.fr/~ricco/cours/slides/effect_size.pdf]
catdes, condesc, assoc.yx, darma
data(Movies)
catdesc(Movies$ArtHouse, Movies[,c("Budget","Genre","Country")])
Run the code above in your browser using DataLab