OPLSDA_pred: Prediction for OPLS-DA

Description Usage Arguments Value Examples

View source: R/OPLSDA.R

Description

Prediction of a new set of observations based on a built model.

Usage

1
OPLSDA_pred(ropls, x.new)

Arguments

ropls

Result from OPLS-DA analysis with the OPLSDA function.

x.new

A vector or matrix of new observations.

Value

A vector with predicted y values.

Examples

1
2
3
4
5
6
data('DataSimul')
x = DataSimul[['x']]
y = DataSimul[['y']]
oplsda.res = OPLSDA(x=x[-c(1:5),], y=y[-c(1:5)],
         impT = FALSE,impG = FALSE, no=2, nb = 15, out.path = '.')
OPLSDA_pred(ropls = oplsda.res, x.new = x[c(1:5),])

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