Identifies the variables and the categories that are the most characteristic according to each dimension obtained by a MCA. It is inspired by dimdesc
function in FactoMineR
package (see Husson et al, 2010), but allows to analyze variants of MCA, such as specific MCA or class specific MCA.
dimdescr(resmca, vars = NULL, dim = c(1,2),
limit = NULL, correlation = "pearson",
na.rm.cat = FALSE, na.value.cat = "NA", na.rm.cont = FALSE,
nperm = NULL, distrib = "asympt",
shortlabs = TRUE)
Returns a list of ncp
lists including:
associations between dimensions of the MCA and the variables in vars
a data frame with categorical variables from vars
and associations measured by correlation coefficients
object of class MCA
, speMCA
, csMCA
, stMCA
or multiMCA
data frame of variables to describes the MCA dimensions with. If NULL (default), the active variables of the MCA will be used.
the dimensions which are described. Default is c(1,2)
for the relationship between a dimension and a categorical variable, only associations (measured with point-biserial correlations) higher or equal to limit will be displayed. If NULL (default), they are all displayed.
character string. The type of correlation measure to be used between two numerical variables : "pearson" (default), "spearman" or "kendall".
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 string. Name of the level for NA category. Default is "NA". Only used if na.rm.cat = FALSE
.
logical indicating whether NA values in the numerical variables should be silently removed before the computation proceeds. Default is FALSE.
numeric. Number of permutations for the permutation tests 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"
).
logical. If TRUE (default), the data frame will have short column names, so that all columns can be displayed side by side on a laptop screen.
Nicolas Robette
See condesc
.
Husson, F., Le, S. and Pages, J. (2010). Exploratory Multivariate Analysis by Example Using R, Chapman and Hall.
condesc
, dimcontrib
, dimeta2
, dimtypicality
# specific MCA on Music example data set
data(Music)
junk <- c("FrenchPop.NA", "Rap.NA", "Rock.NA", "Jazz.NA", "Classical.NA")
mca <- speMCA(Music[,1:5], excl = junk)
# description of the dimensions
dimdescr(mca, limit = 0.1, nperm = 10)
Run the code above in your browser using DataLab