screeplot {stats} | R Documentation |
Scree Plots
Description
screeplot.default
plots the variances against the number of the
principal component. This is also the plot
method for classes
"princomp"
and "prcomp"
.
Usage
screeplot(x, ...)
## Default S3 method:
screeplot(x, npcs = min(10, length(x$sdev)),
type = c("barplot", "lines"),
main = deparse1(substitute(x)), ...)
Arguments
x |
an object containing a |
npcs |
the number of components to be plotted. |
type |
the type of plot. Can be abbreviated. |
main , ... |
graphics parameters. |
References
Mardia KV, Kent JT, Bibby JM (1979). Multivariate Analysis. Academic Press, London.
Venables WN, Ripley BD (2002). Modern Applied Statistics with S, series Statistics and Computing. Springer, New York, NY. doi:10.1007/978-0-387-21706-2.
See Also
Examples
require(graphics)
## The variances of the variables in the
## USArrests data vary by orders of magnitude, so scaling is appropriate
(pc.cr <- princomp(USArrests, cor = TRUE)) # inappropriate
screeplot(pc.cr)
fit <- princomp(covmat = Harman74.cor)
screeplot(fit)
screeplot(fit, npcs = 24, type = "lines")
[Package stats version 4.6.0 Index]