plot.ddsPLS | R Documentation |
Function to plot bootstrap performance results of the ddsPLS algorithm
## S3 method for class 'ddsPLS'
plot(
x,
type = "criterion",
digits = 1,
legend.position = "topright",
horiz = TRUE,
biPlot = FALSE,
comp = c(1, 2),
col = NULL,
cex.names = 1,
mar = c(5, 4, 4, 2) + 0.1,
...
)
x |
A ddsPLS object |
type |
The type of graphics. One of "criterion" (default),
"prop", "predict", "Q2r", "Q2", "R2r", "R2", "weightX", "weightY",
"loadingX" or "loadingY". The type "prop" corresponds to the proportion of
models with positive |
digits |
double. Rounding of the written explained variance. |
legend.position |
character. Where to put the legend. |
horiz |
boolean. Whether to plot horizontally. |
biPlot |
boolean. Whether to plot one component versus another one. |
comp |
vector of two integers. Taken into account only if
|
col |
vector. Mainly to modify bars in weight plots. |
cex.names |
double. Size factor for variable names. |
mar |
vector. The margins for the plot. |
... |
arguments to be passed to methods, such as graphical parameters. |
No return value, called for side effects.
ddsPLS
, predict.ddsPLS
, summary.ddsPLS
n <- 100 ; d <- 2 ; p <- 20 ; q <- 2
phi <- matrix(rnorm(n*d),n,d)
a <- rep(1,p/4) ; b <- rep(1,p/2)
X <- phi%*%matrix(c(1*a,0*a,0*b,1*a,3*b,0*a),nrow = d,byrow = TRUE) +
matrix(rnorm(n*p,sd = 1/4),n,p)
Y <- phi%*%matrix(c(1,0,0,0),nrow = d,byrow = TRUE) +
matrix(rnorm(n*q,sd = 1/4),n,q)
res <- ddsPLS(X,Y,verbose=FALSE)
## Plot criterion
plot(res,type = "criterion")
## Univariate weights of X, same with Y
plot(res,type = "weightX")
## Bivariate weights of X, same with Y
plot(res,type = "weightX",biPlot = TRUE)
## Modify margins to fit the window
plot(res,type = "weightY",mar = c(3,7,3,3))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.