Learn R Programming

PLSbiplot1 (version 0.1)

PLS.biplot_no_labels: The Partial Least Squares (PLS) biplot with the labels of the samples, coefficient points and tick markers excluded

Description

Takes in a set of predictor variables and a set of response variables and produces a PLS biplot, but with no sample points names.

Usage

PLS.biplot_no_labels(X, Y, algorithm = NULL, ax.tickvec.X = NULL, ax.tickvec.Y = NULL, ...)

Arguments

X
A (NxP) predictor matrix
Y
A (NxM) response matrix
algorithm
Any of the PLS algorithms ("mod.NIPALS", "mod.KernelPLS_R", "mod.KernelPLS_L", "mod.SIMPLS")
ax.tickvec.X
tick marker length for each X-variable axis in the PLS biplot
ax.tickvec.Y
tick marker length for each Y-variable axis in the PLS biplot
...
Other arguments. Currently ignored

Value

The PLS biplot of D=[X Y] with no sample points names but with fainted tick markers and labels

Examples

Run this code
if(require(pls))
data(oliveoil, package="pls")
X = as.matrix(oliveoil$chemical, ncol=5)
dimnames(X) = list(paste(c("G1","G2","G3","G4","G5","I1","I2","I3","I4","I5",
"S1","S2","S3","S4","S5","S6")),
paste(c("Acidity","Peroxide","K232","K270","DK")))
Y = as.matrix(oliveoil$sensory, ncol=6)
dimnames(Y) = list(paste(c("G1","G2","G3","G4","G5","I1","I2","I3","I4","I5",
"S1","S2","S3","S4","S5","S6")),
paste(c("Yellow","Green","Brown","Glossy","Transp","Syrup")))
PLS.biplot_no_labels(X, Y, algorithm=mod.SIMPLS, ax.tickvec.X=c(8,5,5,5,5),
ax.tickvec.Y=c(5,8,5,6,9,8))

#cocktail data
if(require(SensoMineR))
data(cocktail, package="SensoMineR")
X3 = as.matrix(compo.cocktail, ncol=4)
Y3 = as.matrix(senso.cocktail, ncol=13)
PLS.biplot_no_labels(X=X3, Y3, algorithm=mod.SIMPLS, ax.tickvec.X=rep(2,ncol(X3)),
ax.tickvec.Y=rep(3,ncol(Y3)))

Run the code above in your browser using DataLab