biplot.sprm: Biplot for sprm objects

Description Usage Arguments Details Author(s) References See Also Examples

Description

This biplot for sprm 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.

Usage

1
2
3
4
## S3 method for class 'sprm'
biplot(x, comps = c(1, 2), 
colors = list(scores = "#0000AA", loadings = "red", background = "#BBBBEE"), 
textsize = 6, arrowshapes = c(25, 0.03), labelpos=0.35, ...)

Arguments

x

object of class sprm.

comps

vector with two integers, referring to the components to be plotted.

colors

list of three elements named scores, 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.

Author(s)

Sven Serneels, BASF Corp.

References

Hoffmann, I., Serneels, S., Filzmoser, P., Croux, C. (2015). Sparse partial robust M regression. Chemometrics and Intelligent Laboratory Systems, 149, 50-59.

Serneels, S., Croux, C., Filzmoser, P., Van Espen, P.J. (2005). Partial Robust M-Regression. Chemometrics and Intelligent Laboratory Systems, 79, 55-64.

See Also

plot.sprm, sprm, biplot.prm

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
set.seed(5023)
U1 <- c(rep(3,20), rep(4,30))
U2 <- rep(3.5,50)
X1 <- replicate(5, U1+rnorm(50))
X2 <- replicate(20, U2+rnorm(50))
X <- cbind(X1,X2)
beta <- c(rep(1, 5), rep(0,20))
e <- c(rnorm(45,0,1.5),rnorm(5,-20,1))
y <- X%*%beta + e
d <- as.data.frame(X)
d$y <- y
mod <- sprms(y~., data=d, a=2, eta=0.5, fun="Hampel")
biplot(mod, comps = c(1, 2))

sprm documentation built on May 2, 2019, 9:57 a.m.