scores {pls}R Documentation

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, ...)
## Default S3 method:
scores(object, ...)
loading.weights(object)
Yscores(object)
Yloadings(object)

Arguments

object a fitted mvr model to extract from.
... extra arguments, currently not used.

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.

Value

A matrix with scores or loadings.

Author(s)

Ron Wehrens and Bjørn-Helge Mevik

See Also

mvr, coef.mvr

Examples

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

[Package pls version 1.0-3 Index]