Learn R Programming

compositions (version 0.9-11)

princomp.rmult: Principle component analysis for Real data

Description

Performes a principle component analysis for datasets of type rmult.

Usage

## S3 method for class 'rmult':
princomp(x,\dots)

Arguments

x
a rmult-dataset
...
Further arguments to call of princomp.default

Value

  • An object of type princomp with the following fields
  • sdevthe standard deviation of the principle components.
  • loadingsthe matrix of variable loadings (i.e., a matrix whose columns contain the eigenvectors). This is of class "loadings". The last eigenspace is removed since it should contain the irrelevant scaling.
  • centerthe clr of the means that was substracted
  • scalethe scaling applied to each variable
  • n.obsnumber of observations
  • scoresif scores = TRUE, the scores of the supplied data on the principle components and the information was available. Scores are coordinates in a basis given by the principle components and thus not compositions.
  • callthe matched call
  • na.actionNot clearly understood

Details

The function just does princomp(unclass(x),...,scale=scale) and is only here for convenience.

See Also

princomp.rplus

Examples

Run this code
data(SimulatedAmounts)
pc <- princomp(rmult(sa.lognormals5))
pc
summary(pc)
plot(pc) 
screeplot(pc)
screeplot(pc,type="l")
biplot(pc)
biplot(pc,choice=c(1,3))
loadings(pc)
plot(loadings(pc))
pc$sdev^2
cov(predict(pc,sa.lognormals5))

Run the code above in your browser using DataLab