Learn R Programming

metaX (version 1.4.0)

myPLSDA: Perform PLS-DA analysis

Description

Perform PLS-DA analysis

Usage

myPLSDA(x, y, save, select, ...)

Arguments

x
A matrix of observations
y
a vector or matrix of responses
save
A logical indicates whether save the plsr result
select
A logical indicates whether select the best component
...
Additional parameters
ncomp
The number of component used for PLS-DA
validation
See plsr
method
See plsr
k
k-fold

Value

The PLS-DA result

Examples

Run this code
x <- matrix(rnorm(1000),nrow = 10,ncol = 100)
y <- rep(0:1,5)
res <- myPLSDA(x,y,save=TRUE,ncomp=2,validation="CV",k=7,
    method="oscorespls")

Run the code above in your browser using DataLab