Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

rediduals-methods

Residuals values from a PCA model.


Description

This function extracts the residuals values from a pcaRes object for the PCA methods SVD, Nipals, PPCA and BPCA

Usage

## S3 method for class 'pcaRes'
residuals(object, data = completeObs(object), ...)

## S4 method for signature 'pcaRes'
residuals(object, data = completeObs(object), ...)

## S4 method for signature 'pcaRes'
resid(object, data = completeObs(object), ...)

Arguments

object

pcaRes the pcaRes object of interest.

data

matrix The data that was used to calculate the PCA model (or a different dataset to e.g. adress its proximity to the model).

...

Passed on to predict.pcaRes. E.g. setting the number of used components.

Value

A matrix with the residuals

Author(s)

Henning Redestig

Examples

data(iris)
pcIr <- pca(iris[,1:4])
head(residuals(pcIr, iris[,1:4]))

pcaMethods

A collection of PCA methods

v1.82.0
GPL (>= 3)
Authors
Wolfram Stacklies, Henning Redestig, Kevin Wright
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.