Biplot method for mvr
objects.
# S3 method for mvr
biplot(x, comps = 1:2, which = c("x", "y", "scores", "loadings"),
var.axes = FALSE, xlabs, ylabs, main, …)
an mvr
object.
integer vector of length two. The components to plot.
character. Which matrices to plot. One of "x"
(X
scores and loadings), "y"
(Y scores and loadings),
"scores"
(X and Y scores) and "loadings"
(X and Y loadings).
logical. If TRUE
, the second set of points
have arrows representing them.
either a character vector of labels for the first set of
points, or FALSE
for no labels. If missing, the row names of
the first matrix is used as labels.
either a character vector of labels for the second set of
points, or FALSE
for no labels. If missing, the row names of
the second matrix is used as labels.
character. Title of plot. If missing, a title is
constructed by biplot.mvr
.
Further arguments passed on to biplot.default
.
biplot.mvr
can also be called through the mvr
plot
method by specifying plottype = "biplot"
.
# NOT RUN {
data(oliveoil)
mod <- plsr(sensory ~ chemical, data = oliveoil)
# }
# NOT RUN {
## These are equivalent
biplot(mod)
plot(mod, plottype = "biplot")
## The four combinations of x and y points:
par(mfrow = c(2,2))
biplot(mod, which = "x") # Default
biplot(mod, which = "y")
biplot(mod, which = "scores")
biplot(mod, which = "loadings")
# }
Run the code above in your browser using DataLab