scores

0th

Percentile

Extract Scores and Loadings from PLSR and PCR Models

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

Keywords
multivariate, regression
Usage
scores(object, ...) "scores"(object, ...)
loadings(object, ...) "loadings"(object, ...)
loading.weights(object)
Yscores(object)
Yloadings(object)
Arguments
object
a fitted 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.

The default scores and loadings methods also handle prcomp objects (their scores and loadings components are called x and rotation, resp.), and add an attribute "explvar" with the variance explained by each component, if this is available. (See explvar for details.)

Value

A matrix with scores or loadings.

Note

There is a loadings function in package stats. It simply returns any element named "loadings". See loadings for details. The function can be accessed as stats::loadings(...).

See Also

mvr, coef.mvr

Aliases
  • scores
  • scores.default
  • loadings
  • loadings.default
  • loading.weights
  • Yscores
  • Yloadings
Examples
data(yarn)
plsmod <- plsr(density ~ NIR, 6, data = yarn)
scores(plsmod)
loadings(plsmod)[,1:4]
Documentation reproduced from package pls, version 2.5-0, License: GPL-2

Community examples

Looks like there are no examples yet.