Learn R Programming

ropls (version 1.4.2)

fitted.opls: Fitted method for 'opls' objects

Description

Returns predictions of the (O)PLS(-DA) model on the training dataset

Usage

"fitted"(object, ...)

Arguments

object
An S4 object of class opls, created by the opls function.
...
Currently not used.

Value

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

Examples

Run this code

data(sacurine)
attach(sacurine)
sacurine.plsda <- opls(dataMatrix, sampleMetadata[, "gender"])

fitted(sacurine.plsda)

detach(sacurine)

Run the code above in your browser using DataLab