ncomp_opls: Find the optimal number of OPLS components

View source: R/ncomp_opls.R

ncomp_oplsR Documentation

Find the optimal number of OPLS components

Description

Find the optimal number of OPLS components based on the highest Q2 value.

Usage

ncomp_opls(Xi, Yi, prep, nrcv)

Arguments

Xi

X matrix N samples x K variables

Yi

Y matrix N samples x I variables (currently works only with single Y)

prep

preprocessing ("uv" for UV scaling, "mc" for mean centering, "no" for no preprocessing)

nrcv

number of folds in cross-validation

Details

Find the optimal number of OPLS components based on the highest Q2 value.

Value

Output is a list of three elements:

A

number of correlated components

ncox

number of orthogonal components in X

ncoy

number of orthogonal components in Y

Author(s)

E. Nevedmoskaya

Rico Derks


ricoderks/Rcpm documentation built on May 18, 2022, 7:49 a.m.