Description Usage Arguments Details Author(s) References See Also Examples
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.
1 2 3 4 |
x |
object of class sprm. |
comps |
vector with two integers, referring to the components to be plotted. |
colors |
list of three elements named |
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. |
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.
Sven Serneels, BASF Corp.
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.
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))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.