tested: Tested method for (O)PLS models

Description Usage Arguments Value Author(s) Examples

Description

Returns predictions of the (O)PLS(-DA) model on the out of the box samples (when a 'subset' of samples has been selected when training the model)

Usage

1
2
3
4
tested(object, ...)

## S4 method for signature 'opls'
tested(object)

Arguments

object

An S4 object of class opls, created by opls function.

...

Currently not used.

Value

Predictions (either a vector, factor, or matrix depending on the y response used for training the model)

Author(s)

Etienne Thevenot, etienne.thevenot@cea.fr

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
data(sacurine)
attach(sacurine)

testedorMN <- dataMatrix
responseFc <- sampleMetadata[, "gender"]

sacurine.plsda <- opls(testedorMN,
                       responseFc,
                       subset = "odd")

trainVi <- getSubsetVi(sacurine.plsda)

table(responseFc[trainVi], fitted(sacurine.plsda))

detach(sacurine)

ropls documentation built on Nov. 8, 2020, 7:46 p.m.