Learn R Programming

idm (version 1.3.1)

update.i_pca: Updates a Principal Component Analysis solution

Description

This function updates the Principal Component Analysis (PCA) solution on the covariance matrix using the incremental method of Hall, Marshall & Martin (2002)

Usage

"update"(object, incdata, ...)

Arguments

object
object of class 'i_pca'
incdata
matrix of incoming data
...
Further arguments passed to update

Value

rowpcoord
Row scores on the principal components
colpcoord
Variable loadings
eg
A list describing the eigenspace of a data matrix, with components u Left eigenvectors v Right eigenvectors m Number of cases d Eigenvalues orgn Data mean
inertia_e
Percentages of explained variance
sv
Singular values
levelnames
Column names
rowctr
Row contributions
rowcor
Row squared correlations
colctr
Column contributions
colcor
Column squared correlations

References

Hall, P., Marshall, D., & Martin, R. (2002). Adding and subtracting eigenspaces with eigenvalue decomposition and singular value decomposition. Image and Vision Computing, 20(13), 1009-1016. Iodice D' Enza, A., & Markos, A. (2015). Low-dimensional tracking of association structures in categorical data, Statistics and Computing, 25(5), 1009-1022.

See Also

update.i_mca, i_pca, i_mca, add_es

Examples

Run this code
data(iris, package="datasets")
dat = scale(iris[,-5])
res_pca = i_pca(dat[1:50,-5])
aa = seq(50,150,50)
for (k in c(1:2)) {
  res_pca = update(res_pca, dat[c((aa[k]+1):aa[k+1]),])
} 
plot(res_pca, animation = FALSE)  

Run the code above in your browser using DataLab