Learn R Programming

sprm (version 1.2.2)

biplot.sprmda: Biplot for sprmda objects of Sparse PRM discriminant analysis

Description

This biplot for sprmda objects visualizes the original variables which contribute to the model and their impact on the latent components as well as the position of the observations in the transformed space. The data is projected onto two of the latent components and colored according to class membership.

Usage

"biplot"(x, comps = c(1, 2), colors = list(scores1="orange", scores2="darkgreen", loadings="red", background="gray84"), textsize = 6, arrowshapes = c(25, 0.03), labelpos = 0.35, ...)

Arguments

x
object of class sprmda.
comps
vector with two integers, referring to the components to be plotted.
colors
list of four elements named scores1 (for observations of group coded with 1), scores2 (for observations of group coded with -1), loadings and background with color codes or names of colors.
textsize
the text size in which to print the scores and loading names.
arrowshapes
vector of length two containing the angle of the arrowheads and their relative length in npc.
labelpos
numeric value; determines distance of the arrow label to the arrowhead.
...
further arguments. Currently not used.

Details

The sparsity of the biplot is inherited by the sparsity of the model. Only the contributing variables are included in the plot, which can lead to better visualization and easier interpretation.

References

Hoffmann, I., Filzmoser, P., Serneels, S., Varmuza, K., Sparse and robust PLS for binary classification.

See Also

sprmda

Examples

Run this code
data(iris)
data <- droplevels(subset(iris,iris$Species!="setosa"))
smod <- sprmda(Species~.,data, a=2, eta=0.7, class="lda")
biplot(smod)

Run the code above in your browser using DataLab