OPLSDA: OPLS-DA for a two-class problem

Description Usage Arguments Details Value Examples

View source: R/OPLSDA.R

Description

OPLS-DA for a two-class problem. Only one response is allowed and the number of predictive components is fixed to 1 accordingly.

Usage

1
OPLSDA(x, y, impT = FALSE, impG = FALSE, no = 2, nb = 15, out.path = ".")

Arguments

x

A data matrix on which will be based the analysis.

y

A numerical vector representing the class of individuals.

impT

If TRUE, prints the results.

impG

If TRUE, save results' graphics in pdf format.

no

Number of orthogonal components to keep.

nb

Number of biomarkers to select.

out.path

Path to output the results' graphics

Details

The function allows only one predictive component since it is designed for a single dependent variable. It is based on the NIPALS PLS algorithm: after the removal of orthogonal components from the X matrix, a PLS1 NIPALS is ran on the filtered X matrix.

Value

A list with the following elements:

b

Model coefficients

Tp

Predictive scores

Pp

Predictive loadings

W

X-weights

C

y-weights

Tortho

Orthogonal scores

Portho

Orthogonal loadings

Wortho

Orthogonal weights matrix

Selected.biomarkers

Vector of identified biomarkers

CV

Criterion for the number of orthogonal components to keep

original.dataset

Original X matrix

Xopls

OPLS-filtered X matrix

original.response

Original y vector

Examples

1
2
3
4
data('DataSimul')
x = DataSimul[['x']]
y = DataSimul[['y']]
oplsda.res = OPLSDA(x=x, y=y, impT = FALSE,impG = FALSE, no=2, nb = 15, out.path = '.')

ManonMartin/MBXUCL documentation built on Nov. 26, 2021, 8:45 p.m.