Learn R Programming

MAIT (version 1.6.0)

PLSDA: Applies PLSDA to the provided data

Description

Function PLSDA performs Fisher's LSD tests on the data using the package plsgenomics

Usage

PLSDA(Xtrain, Ytrain, Xtest = NULL, ncomp, nruncv = 0, alpha = 2/3, priors = NULL)

Arguments

Xtrain
A numerical matrix containing the data
Ytrain
A factor vector containing the class labels of the samples
Xtest
A numerical matrix containing the data whose class is to be predicted.
ncomp
Number of components to build the PCA model
nruncv
Number of cross-validation iterations to be performed for the choice of the number of latent components
alpha
The proportion of Obesrvations to be included in the training set at each cross-validation iteration
priors
The class priors to be used for linear discriminant analysis. If unspecified, the class proportions in the training set are used.

Value

A list containing the output of function pls.regression, the predicted class for the Xtest dataset and the number of components used.