Learn R Programming

pls (version 1.0-2)

scores: Extract Scores and Loadings from PLSR and PCR Models

Description

These functions extract score and loading matrices from fitted mvr models.

Usage

scores(object, ...)
## S3 method for class 'prcomp':
scores(object, \dots)
## S3 method for class 'default':
scores(object, \dots)
loading.weights(object)
Yscores(object)
Yloadings(object)

Arguments

Value

  • A matrix with scores or loadings.

encoding

latin1

Details

All functions extract the indicated matrix from the fitted model, and will work with any object having a suitably named component. scores also has a method for prcomp objects (their score component is called x). loadings is in package stats, and is documented there.

See Also

mvr, coef.mvr

Examples

Run this code
data(NIR)
plsmod <- plsr(y ~ X, 6, data = NIR)
scores(plsmod)
loadings(plsmod)[,1:4]

Run the code above in your browser using DataLab