dudi.mix | R Documentation |
performs a multivariate analysis with mixed quantitative variables and factors.
dudi.mix(df, add.square = FALSE, scannf = TRUE, nf = 2)
df |
a data frame with mixed type variables (quantitative, factor and ordered) |
add.square |
a logical value indicating whether the squares of quantitative variables should be added |
scannf |
a logical value indicating whether the eigenvalues bar plot should be displayed |
nf |
if scannf FALSE, an integer indicating the number of kept axes |
If df contains only quantitative variables, this is equivalent to a normed PCA.
If df contains only factors, this is equivalent to a MCA.
Ordered factors are replaced by poly(x,deg=2)
.
This analysis generalizes the Hill and Smith method.
The principal components of this analysis are centered and normed vectors maximizing the sum of the:
squared correlation coefficients with quantitative variables
squared multiple correlation coefficients with polynoms
correlation ratios with factors.
Returns a list of class mix
and dudi
(see dudi) containing also
index |
a factor giving the type of each variable : f = factor, o = ordered, q = quantitative |
assign |
a factor indicating the initial variable for each column of the transformed table |
cr |
a data frame giving for each variable and each score: |
Daniel Chessel
Anne-Béatrice Dufour anne-beatrice.dufour@univ-lyon1.fr
Hill, M. O., and A. J. E. Smith. 1976. Principal component analysis of taxonomic data with multi-state discrete characters. Taxon, 25, 249-255.
De Leeuw, J., J. van Rijckevorsel, and . 1980. HOMALS and PRINCALS - Some generalizations of principal components analysis. Pages 231-242 in E. Diday and Coll., editors. Data Analysis and Informatics II. Elsevier Science Publisher, North Holland, Amsterdam.
Kiers, H. A. L. 1994. Simple structure in component analysis techniques for mixtures of qualitative ans quantitative variables. Psychometrika, 56, 197-212.
data(dunedata) dd1 <- dudi.mix(dunedata$envir, scann = FALSE) if(adegraphicsLoaded()) { g1 <- scatter(dd1, row.plab.cex = 1, col.plab.cex = 1.5) } else { scatter(dd1, clab.r = 1, clab.c = 1.5) } dd2 <- dudi.mix(dunedata$envir, scann = FALSE, add.square = TRUE) if(adegraphicsLoaded()) { g2 <- scatter(dd2, row.plab.cex = 1, col.plab.cex = 1.5) } else { scatter(dd2, clab.r = 1, clab.c = 1.5) }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.