powered by
Principal component analysis.
logpca(x, center = TRUE, scale = TRUE, k = NULL, vectors = FALSE)
A matrix with the compositional data. Zero values are not allowed.
Do you want your data centered? TRUE or FALSE.
Do you want each of your variables scaled, i.e. to have unit variance? TRUE or FALSE.
If you want a specific number of eigenvalues and eigenvectors set it here, otherwise all eigenvalues (and eigenvectors if requested) will be returned.
Do you want the eigenvectors be returned? By dafault this is FALSE.
A list including:
The eigenvalues.
The eigenvectors.
The logarithm is applied to the compositional data and PCA is performed.
Aitchison J. (1986). The statistical analysis of compositional data. Chapman & Hall.
alfa.pca, alfa.pcr, kl.alfapcr
# NOT RUN { x <- as.matrix(iris[, 1:4]) x <- x/ rowSums(x) a <- logpca(x) # }
Run the code above in your browser using DataLab