MFAmix: Multiple factor analysis of mixed data

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Performs multiple factor analysis to analyze a set of individuals (observations) described by several groups of variables. Variables within a group can be a mixture of quantitative and qualitative variables.

Usage

1
2
  MFAmix(data, groups, name.groups, ndim=5, rename.level=FALSE, graph = TRUE,
    axes = c(1, 2))

Arguments

data

a data frame with n rows and p columns containing all the variables. This data frame will be split into G groups according to the vector groups.

groups

a vector which gives the groups of the columns in data.

name.groups

a vector of size G which gives the names of the groups.

ndim

number of dimensions kept in the results (by default 5).

rename.level

boolean, if TRUE all the levels of the qualitative variables are renamed as follows: "variable_name=level_name". This prevents to have identical names for the levels.

graph

boolean, if TRUE the following graphics are displayed for the first two dimensions of PCAmix: plot of the individuals coordinates, plot of the squared loadings of variables, plot of the partial axes, plot of the correlation circle (if quantitative variables are available), plot of the levels component map (if qualitative variables are available).

axes

a length 2 vector specifying the axes to plot.

Details

Multiple Factor Analysis (MFA) developed by Escofier and Pages in 1983 is a method of factorial analysis to deal with multiple groups of variables collected on the same observations. The main idea of MFA is to normalize each group by dividing all the variables belonging to this group by the first eigenvalue coming from the Principal Component Analysis (PCA) of this group. Then, a usual PCA on all the weighted variables taken together is applied. Initially this method has been developed for groups only containing quantitative variables. Afterwards this method has been improved to deal simultaneously with groups of qualitative variables and groups of quantitative variables. The MFAmix method allows to perform MFA method for groups containing a mixture of quantitative and qualitative variables

One of the outputs available in the MFAmix method are the squared loadings (sqload). Squared loadings for a qualitative variable are correlation ratios between the variable and the principal components. For a quantitative variable, squared loadings are the squared correlation between the variable and the principal components.

Some others outputs are specific to MFA:

Value

eig

a matrix containing the eigenvalues, the percentages of variance and the cumulative percentages of variance.

ind

a list containing the results for the individuals (observations):

  • $coord: factor coordinates (scores) of the individuals,

  • $contrib: absolute contributions of the individuals,

  • $contrib.pct: relative contributions of the individuals,

  • $cos2: squared cosinus of the individuals.

quanti

a list containing the results for the quantitative variables:

  • $coord: factor coordinates (scores) of the quantitative variables,

  • $contrib: absolute contributions of the quantitative variables,

  • $contrib.pct: relative contributions of the quantitative variables (in percentage),

  • $cos2: squared cosinus of the quantitative variables.

levels

a list containing the results for the levels of the qualitative variables:

  • $coord: factor coordinates (scores) of the levels,

  • $contrib: absolute contributions of the levels,

  • $contrib.pct: relative contributions of the levels (in percentage),

  • $cos2: squared cosinus of the levels.

quali

a list containing the results for the qualitative variables:

  • $contrib: absolute contributions of the qualitative variables (sum of absolute contributions of the levels of the qualitative variable),

  • $contrib.pct: relative contributions (in percentage) of the qualitative variables (sum of relative contributions of the levels of the qualitative variable).

sqload

a matrix of dimension (p, ndim) containing the squared loadings of the quantitative and qualitative variables.

coef

the coefficients of the linear combinations used to construct the principal components of MFAmix, and to predict coordinates (scores) of new observations in the function predict.MFAmix.

eig.separate

a matrix containing the ndim first eigenvalues of the separated analyses of each group.

separate.analyses

the results for the separated analyses of each group.

groups

a list containing the results for the groups:

  • $Lg: Lg coefficients between groups,

  • $RV: RV coefficients between groups,

  • $contrib: contributions of the groups (sum of variable contributions belonging to the group)

  • $contrib.pct: relative contributions of the groups times 100,

partial.axes

a matrix containing the coordinates of the partial axes.

ind.partial

a list of G matrices containing the coordinates of the partial individuals.

listvar.group

list the variables in each group. It is usefull to check the adequacy between the vector groups and the vector name.groups.

global.pca

an object of class PCAmix containing the results of MFAmix considered as a unique PCAmix.

Author(s)

Amaury Labenne amaury.labenne@irstea.fr, Marie Chavent, Vanessa Kuentz, Benoit Liquet, Jerome Saracco

References

Chavent M., Kuentz-Simonet V., Labenne A., Saracco J., Multivariate analysis of mixed data: The PCAmixdata R package, arXiv:1411.4911 [stat.CO].

Escofier, B. and Pages, J. (1994). Multiple factor analysis (afmult package). Computational statistics & data analysis, 18(1):121-140.

Le, S., Josse, J., and Husson, F. (2008). Factominer: an r package for multivariate analysis. Journal of statistical software, 25(1):1-18.

See Also

print.MFAmix, summary.MFAmix, predict.MFAmix, plot.MFAmix

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
data(gironde)

class.var<-c(rep(1,9),rep(2,5),rep(3,9),rep(4,4))
names <- c("employment","housing","services","environment")

dat<-cbind(gironde$employment[1:20,],gironde$housing[1:20,],
      gironde$services[1:20,],gironde$environment[1:20,])
      
res<-MFAmix(data=dat,groups=class.var,
      name.groups=names, rename.level=TRUE, ndim=3,graph=FALSE)
      
summary(res)

PCAmixdata documentation built on May 2, 2019, 12:38 p.m.