# dudi.mix: Ordination of Tables mixing quantitative variables and... In ade4: Analysis of Ecological Data: Exploratory and Euclidean Methods in Environmental Sciences

## Description

performs a multivariate analysis with mixed quantitative variables and factors.

## Usage

 `1` ```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: the squared correlation coefficients if it is a quantitative variable the correlation ratios if it is a factor the squared multiple correlation coefficients if it is ordered

## Author(s)

Daniel Chessel
Anne-Béatrice Dufour [email protected]

## 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

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14``` ```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) } ```

### Example output

```
```

ade4 documentation built on Aug. 31, 2018, 5:04 p.m.