| 42333 |
ripley |
1 |
% File src/library/stats/man/biplot.princomp.Rd
|
|
|
2 |
% Part of the R package, http://www.R-project.org
|
| 59039 |
ripley |
3 |
% Copyright 1995-2007 R Core Team
|
| 42333 |
ripley |
4 |
% Distributed under GPL 2 or later
|
|
|
5 |
|
| 27474 |
ripley |
6 |
\name{biplot.princomp}
|
| 56186 |
murdoch |
7 |
\alias{biplot.princomp}
|
| 27474 |
ripley |
8 |
\alias{biplot.prcomp}
|
|
|
9 |
\title{
|
|
|
10 |
Biplot for Principal Components
|
|
|
11 |
}
|
|
|
12 |
\description{
|
|
|
13 |
Produces a biplot (in the strict sense) from the output of
|
|
|
14 |
\code{\link{princomp}} or \code{\link{prcomp}}
|
|
|
15 |
}
|
|
|
16 |
\usage{
|
| 27968 |
ripley |
17 |
\method{biplot}{prcomp}(x, choices = 1:2, scale = 1, pc.biplot = FALSE, \dots)
|
| 30915 |
ripley |
18 |
|
| 27474 |
ripley |
19 |
\method{biplot}{princomp}(x, choices = 1:2, scale = 1, pc.biplot = FALSE, \dots)
|
|
|
20 |
}
|
|
|
21 |
\arguments{
|
|
|
22 |
\item{x}{an object of class \code{"princomp"}.}
|
|
|
23 |
\item{choices}{
|
|
|
24 |
length 2 vector specifying the components to plot. Only the default
|
|
|
25 |
is a biplot in the strict sense.
|
|
|
26 |
}
|
|
|
27 |
\item{scale}{
|
|
|
28 |
The variables are scaled by \code{lambda ^ scale} and the
|
|
|
29 |
observations are scaled by \code{lambda ^ (1-scale)} where
|
|
|
30 |
\code{lambda} are the singular values as computed by
|
| 61433 |
ripley |
31 |
\code{\link{princomp}}. Normally \code{0 <= scale <= 1}, and a warning
|
| 27474 |
ripley |
32 |
will be issued if the specified \code{scale} is outside this range.
|
|
|
33 |
}
|
|
|
34 |
\item{pc.biplot}{
|
|
|
35 |
If true, use what Gabriel (1971) refers to as a "principal component
|
|
|
36 |
biplot", with \code{lambda = 1} and observations scaled up by sqrt(n) and
|
|
|
37 |
variables scaled down by sqrt(n). Then inner products between
|
|
|
38 |
variables approximate covariances and distances between observations
|
|
|
39 |
approximate Mahalanobis distance.
|
|
|
40 |
}
|
|
|
41 |
\item{\dots}{optional arguments to be passed to
|
|
|
42 |
\code{\link{biplot.default}}.}
|
|
|
43 |
}
|
|
|
44 |
\section{Side Effects}{
|
|
|
45 |
a plot is produced on the current graphics device.
|
|
|
46 |
}
|
|
|
47 |
\details{
|
|
|
48 |
This is a method for the generic function \code{biplot}. There is
|
|
|
49 |
considerable confusion over the precise definitions: those of the
|
|
|
50 |
original paper, Gabriel (1971), are followed here. Gabriel and
|
|
|
51 |
Odoroff (1990) use the same definitions, but their plots actually
|
|
|
52 |
correspond to \code{pc.biplot = TRUE}.
|
|
|
53 |
}
|
|
|
54 |
\references{
|
|
|
55 |
Gabriel, K. R. (1971).
|
|
|
56 |
The biplot graphical display of matrices with applications to
|
|
|
57 |
principal component analysis.
|
|
|
58 |
\emph{Biometrika}, \bold{58}, 453--467.
|
|
|
59 |
|
|
|
60 |
Gabriel, K. R. and Odoroff, C. L. (1990).
|
|
|
61 |
Biplots in biomedical research.
|
|
|
62 |
\emph{Statistics in Medicine}, \bold{9}, 469--485.
|
|
|
63 |
}
|
|
|
64 |
\seealso{
|
|
|
65 |
\code{\link{biplot}},
|
|
|
66 |
\code{\link{princomp}}.
|
|
|
67 |
}
|
|
|
68 |
\examples{
|
| 41508 |
ripley |
69 |
require(graphics)
|
| 27474 |
ripley |
70 |
biplot(princomp(USArrests))
|
|
|
71 |
}
|
|
|
72 |
\keyword{multivariate}
|
|
|
73 |
\keyword{hplot}
|