residuals.pcaRes {pcaMethods} | R Documentation |
This function extracts the residuals values from a pcaRes object for the PCA methods SVD, Nipals, PPCA and BPCA
residuals.pcaRes(object, data, nPcs=object@nPcs, ...)
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). |
nPcs |
numeric The amount of PC's to consider |
... |
Not passed on anywhere, included for S3 consistency. |
A matrix
with the residuals
Henning Redestig <redestig[at]psc.riken.jp>
data(iris) pcIr <- pca(iris[,1:4]) head(residuals(pcIr, iris[,1:4]))