principal component analysis (PCA) when variables are quantitative, correspondence analysis (CA) 连续变量
multiple correspondence analysis (MCA) when variables are categorical, 类别变量混合数据
Multiple Factor Analysis when variables are structured in groups, etc. and hierarchical cluster analysis描述性属性的结构化子集
FactoMineR包包含以上分析
library()
#http://factominer.free.fr/factomethods/multiple-factor-analysis.html
library(FactoMineR)
data(wine)
res = MFA(wine, group=c(2,5,3,10,9,2),
type=c("n",rep("s",5)), ncp=5,
name.group=c("origin","odor","visual","odor.after.shaking", "taste","overall"),
num.group.sup=c(1,6))
#wine: the data set used
#group: 根据type的规定对变量分类(相似的可以归于同一类),总数等于变量之和,相邻的变量类型相同则进行合并。a vector indicating the number of variables in each group
#type: the type of the variables in each group. "s" for scaled continuous variables, "c" for centered (unscaled) continuous variables and "n" for categorical variables
#ncp: 成分数量number of dimensions kept in the result
#name.group: names of the groups
#num.group.sup: indexes of the supplementary groups