These functions extract score and loading matrices from fitted
loadings(object, ...) ## Default S3 method: loadings(object, ...) scores(object, ...) ## Default S3 method: scores(object, ...) Yscores(object) loading.weights(object) Yloadings(object)
a fitted model to extract from.
extra arguments, currently not used.
All functions extract the indicated matrix from the fitted model, and will work with any object having a suitably named component.
loadings methods also handle
prcomp objects (their scores and loadings components are called
rotation, resp.), and add an attribute
with the variance explained by each component, if this is available. (See
explvar for details.)
A matrix with scores or loadings.
There is a
loadings function in package stats. It simply
returns any element named
loadings for details. The function can be accessed as
Ron Wehrens and Bjørn-Helge Mevik
data(yarn) plsmod <- plsr(density ~ NIR, 6, data = yarn) scores(plsmod) loadings(plsmod)[,1:4]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.