Learn R Programming

GDAtools (version 2.1)

supvars: Statistics for categorical supplementary variables

Description

From MCA results, computes statistics (weights, coordinates, squared cosines, contributions, test-values, variances) for categorical supplementary variables.

Usage

supvars(resmca, vars)

varsups(resmca, vars)

Value

Returns a list with the following items :

weight

numeric vector of categories weights

coord

data frame of categories coordinates

cos2

data frame of categories squared cosines

var

a list of data frames of categories within variances, variance between and within categories and variable square correlation ratio (eta2)

typic

data frame of categories typicality test statistics

pval

data frame of categories p-values from typicality test statistics

cor

data frame of categories correlation coefficients

Arguments

resmca

object of class MCA, speMCA, csMCA, stMCA or multiMCA

vars

A data frame of categorical supplementary variables. All these variables should be factors.

Author

Nicolas Robette

References

Le Roux B. and Rouanet H., Multiple Correspondence Analysis, SAGE, Series: Quantitative Applications in the Social Sciences, Volume 163, CA:Thousand Oaks (2010).

Le Roux B. and Rouanet H., Geometric Data Analysis: From Correspondence Analysis to Stuctured Data Analysis, Kluwer Academic Publishers, Dordrecht (June 2004).

See Also

supvar, ggadd_supvar, ggadd_supvars, textvarsup, supind

Examples

Run this code
# specific MCA of 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)
# computes statistics for Gender and Age supplementary variables
supvars(mca, Music[, c("Gender","Age")])

Run the code above in your browser using DataLab