| 42333 |
ripley |
1 |
% File src/library/stats/man/biplot.princomp.Rd
|
| 68948 |
ripley |
2 |
% Part of the R package, https://www.R-project.org
|
| 88553 |
hornik |
3 |
% Copyright 1995-2025 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
|
| 90060 |
hornik |
31 |
\code{\link{princomp}}.
|
|
|
32 |
Normally \eqn{0 \le \code{scale} \le 1}, and a warning
|
| 27474 |
ripley |
33 |
will be issued if the specified \code{scale} is outside this range.
|
|
|
34 |
}
|
|
|
35 |
\item{pc.biplot}{
|
| 88553 |
hornik |
36 |
If true, use what \bibcitet{R:Gabriel:1971} refers to as a
|
|
|
37 |
\dQuote{principal component biplot},
|
|
|
38 |
with \code{lambda = 1} and observations scaled up by sqrt(n) and
|
| 27474 |
ripley |
39 |
variables scaled down by sqrt(n). Then inner products between
|
|
|
40 |
variables approximate covariances and distances between observations
|
|
|
41 |
approximate Mahalanobis distance.
|
|
|
42 |
}
|
|
|
43 |
\item{\dots}{optional arguments to be passed to
|
|
|
44 |
\code{\link{biplot.default}}.}
|
|
|
45 |
}
|
|
|
46 |
\section{Side Effects}{
|
| 88553 |
hornik |
47 |
a plot is produced on the current graphics device.
|
| 27474 |
ripley |
48 |
}
|
|
|
49 |
\details{
|
| 88553 |
hornik |
50 |
This is a method for the generic function \code{biplot}. There is
|
|
|
51 |
considerable confusion over the precise definitions: those of the
|
|
|
52 |
original paper, \bibcitet{R:Gabriel:1971}, are followed here.
|
|
|
53 |
\bibcitet{R:Gabriel+Odoroff:1990} use the same definitions, but their
|
|
|
54 |
plots actually correspond to \code{pc.biplot = TRUE}.
|
| 27474 |
ripley |
55 |
}
|
|
|
56 |
\references{
|
| 88553 |
hornik |
57 |
\bibshow{*}
|
| 27474 |
ripley |
58 |
}
|
|
|
59 |
\seealso{
|
|
|
60 |
\code{\link{biplot}},
|
|
|
61 |
\code{\link{princomp}}.
|
|
|
62 |
}
|
|
|
63 |
\examples{
|
| 41508 |
ripley |
64 |
require(graphics)
|
| 27474 |
ripley |
65 |
biplot(princomp(USArrests))
|
|
|
66 |
}
|
|
|
67 |
\keyword{multivariate}
|
|
|
68 |
\keyword{hplot}
|