Robust principal components
This function computes robust principal components based on the minimization of the "residual" M-scale.
pcaRobS(X, ncomp, desprop = 0.9, deltasca = 0.5, maxit = 100)
X |
a data matrix with observations in rows. |
ncomp |
desired (maximum) number of components |
desprop |
desired (minimum) proportion of explained variability (default = 0.9) |
deltasca |
"delta" parameter of the scale M-estimator (default=0.5) |
maxit |
maximum number of iterations (default= 100) |
A list with the following components:
q |
The actual number of principal components |
propex |
The actual proportion of unexplained variability |
eigvec |
Eigenvectors, in a |
fit |
an |
repre |
An |
propSPC |
A vector of length |
Ricardo Maronna, rmaronna@retina.ar, based on original code by D. Pen~a and J. Prieto
data(bus) X0 <- as.matrix(bus) X1 <- X0[,-9] ss <- apply(X1, 2, mad) mu <- apply(X1, 2, median) X <- scale(X1, center=mu, scale=ss) q <- 3 #compute three components rr <- pcaRobS(X, q, 0.99) round(rr$eigvec, 3)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.