Covariance Matrix Estimation from princomp Object
computes the covariance matrix from a princomp object. The number of components k can be given as input.
covPC(x, k, method)
x |
an object of class princomp. |
k |
number of PCs to use for covariance estimation (optional). |
method |
method how the PCs have been estimated (optional). |
There are several possibilities to estimate the principal components (PCs)
from an input data matrix, including the functions PCAproj
and
PCAgrid
. This function uses the estimated PCs to reconstruct
the covariance matrix. Not all PCs have to be used, the number k of
PCs (first k PCs) can be given as input to the function.
cov |
the estimated covariance matrix |
center |
the center of the data, as provided from the princomp object. |
method |
a string describing the method that was used to calculate the PCs. |
Heinrich Fritz, Peter Filzmoser <P.Filzmoser@tuwien.ac.at>
C. Croux, P. Filzmoser, M. Oliveira, (2007). Algorithms for Projection-Pursuit Robust Principal Component Analysis, Chemometrics and Intelligent Laboratory Systems, Vol. 87, pp. 218-225.
# multivariate data with outliers library(mvtnorm) x <- rbind(rmvnorm(200, rep(0, 6), diag(c(5, rep(1,5)))), rmvnorm( 15, c(0, rep(20, 5)), diag(rep(1, 6)))) pc <- princomp(x) covPC(pc, k=2)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.