Learn R Programming

Momocs (version 0.1-03)

Multivariate Analysis: pca: A wrapper for dudi.pca on Nef-objects.

Description

A wrapper for dudi.pca in ade4 on Nef-objects.

Usage

pca(Nef, subset=NULL,
		 row.w,
		 col.w,
		 center=TRUE,
		 scale=FALSE,
		 scannf=FALSE,
		 nf=3)

Arguments

Nef
The Nef object
subset
If non NULL, then the subset on which to perform the PCA. Must be specified as one of the levels of the factor slot (Nef@fac.
row.w
A vector giving the rows weights (see Details).
col.w
A vector giving the cols weights (see Details).
center
logical. Whether to center or not the harmonic coefficients.
scale
logical. Whether to scale or not the harmonic coefficients.
scannf
logical. Whether to ask or not the number of PC to retain.
nf
integer. If scannf is FALSE, then the number of PC to retain.

Value

  • Return a dudi.pca object

Details

The default parameters should be satisfying for most of the cases. For instance, amplitude of coefficients is not rescaled since first harmonics capture most of the information. See the reference below for further technical discussion on PCA on harmonic coefficients.

References

See the papers below that introduce ade4 and also the package's homepage: http://pbil.univ-lyon1.fr/ADE-4/ Dray, S. and Dufour, A.B. (2007): The ade4 package: implementing the duality diagram for ecologists. Journal of Statistical Software. 22(4): 1-20. Chessel, D. and Dufour, A.B. and Thioulouse, J. (2004): The ade4 package-I- One-table methods. R News. 4: 5-10. Dray, S. and Dufour, A.B. and Chessel, D. (2007): The ade4 package-II: Two-table and K-table methods. R News. 7(2): 47-52.

See Also

dudi.pca.

Examples

Run this code
data(bot)
botD <- pca(eFourier(bot))
botD # note the new components

Run the code above in your browser using DataLab