dudi.mix {ade4} | R Documentation |
Ordination of Tables mixing quantitative variables and factors
Description
performs a multivariate analysis with mixed quantitative variables and factors.
Usage
dudi.mix(df, add.square = FALSE, scannf = TRUE, nf = 2)
Arguments
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 |
Details
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.
Value
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: |
Author(s)
Daniel Chessel
Anne-BĂ©atrice Dufour anne-beatrice.dufour@univ-lyon1.fr
References
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.
Examples
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)
}