R: Summary method for Principal Components Analysis
summary.princomp
R Documentation
Summary method for Principal Components Analysis
Description
The summary method for class "princomp".
Usage
## S3 method for class 'princomp'
summary(object, loadings = FALSE, cutoff = 0.1, ...)
## S3 method for class 'summary.princomp'
print(x, digits = 3, loadings = x$print.loadings,
cutoff = x$cutoff, ...)
Arguments
object
an object of class "princomp", as
from princomp().
loadings
logical. Should loadings be included?
cutoff
numeric. Loadings below this cutoff in absolute value
are shown as blank in the output.
x
an object of class "summary.princomp".
digits
the number of significant digits to be used in listing
loadings.
...
arguments to be passed to or from other methods.
Value
object with additional components cutoff and
print.loadings.
See Also
princomp
Examples
summary(pc.cr <- princomp(USArrests, cor = TRUE))
## The signs of the loading columns are arbitrary
print(summary(princomp(USArrests, cor = TRUE),
loadings = TRUE, cutoff = 0.2), digits = 2)
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(stats)
> png(filename="/home/ddbj/snapshot/RGM3/R_rel/result/stats/summary.princomp.Rd_%03d_medium.png", width=480, height=480)
> ### Name: summary.princomp
> ### Title: Summary method for Principal Components Analysis
> ### Aliases: summary.princomp print.summary.princomp
> ### Keywords: multivariate
>
> ### ** Examples
>
> summary(pc.cr <- princomp(USArrests, cor = TRUE))
Importance of components:
Comp.1 Comp.2 Comp.3 Comp.4
Standard deviation 1.5748783 0.9948694 0.5971291 0.41644938
Proportion of Variance 0.6200604 0.2474413 0.0891408 0.04335752
Cumulative Proportion 0.6200604 0.8675017 0.9566425 1.00000000
> ## The signs of the loading columns are arbitrary
> print(summary(princomp(USArrests, cor = TRUE),
+ loadings = TRUE, cutoff = 0.2), digits = 2)
Importance of components:
Comp.1 Comp.2 Comp.3 Comp.4
Standard deviation 1.5748783 0.9948694 0.5971291 0.41644938
Proportion of Variance 0.6200604 0.2474413 0.0891408 0.04335752
Cumulative Proportion 0.6200604 0.8675017 0.9566425 1.00000000
Loadings:
Comp.1 Comp.2 Comp.3 Comp.4
Murder -0.54 0.42 -0.34 0.65
Assault -0.58 -0.27 -0.74
UrbanPop -0.28 -0.87 -0.38
Rape -0.54 0.82
>
>
>
>
>
> dev.off()
null device
1
>