screeplot {mva} | R Documentation |
screeplot
plots the variances against the number of the
principal component. This is also the plot
method for class
"princomp"
.
screeplot(x, npcs = min(10, length(x$sdev)),
type = c("barplot", "lines"), main = deparse(substitute(x)), ...)
x |
an object of class |
npcs |
the number of principal components to be plotted. |
type |
the type of plot. |
main , ... |
graphics parameters. |
Mardia, K. V., J. T. Kent and J. M. Bibby (1979). Multivariate Analysis, London: Academic Press.
Venables, W. N. and B. D. Ripley (1997, 9). Modern Applied Statistics with S-PLUS, Springer-Verlag.
princomp
.
## The variances of the variables in the
## USArrests data vary by orders of magnitude, so scaling is appropriate
data(USArrests)
(pc.cr <- princomp(USArrests, cor = TRUE)) # inappropriate
screeplot(pc.cr)
data(Harman74.cor)
fit <- princomp(covmat=Harman74.cor)
screeplot(fit)
screeplot(fit, npcs=24, type="lines")