prcomp.robust {mdqc} | R Documentation |
A function that performs PCA using the robust estimators "S-estimator","MCD" and "MVE".
prcomp.robust(x, robust = c("S-estimator","MCD", "MVE"), nsamp = 10*nrow(x), ...) ## S3 method for class 'robust': prcomp(x, robust = c("S-estimator","MCD", "MVE"), nsamp = 10*nrow(x), ...)
x |
a matrix. Contains the data to perform PCA on. |
robust |
The robust estimator to use. One of "S-estimator" ,
"MCD" , or "MVE" . The default robust estimator is the S-estimator with
25% breakdown point. |
nsamp |
The number of subsamples that the robust estimator should use. This defaults to 10 times the number of rows in the matrix. |
... |
Further arguments that can be passed to the robust estimator |
The calculation is done by a singular value decomposition of the
robust centered and scaled data matrix, not by using
eigen
on the covariance matrix. This
is generally the preferred method for numerical accuracy. The
print
method for the these objects prints the results in a nice
format and the plot
method produces a scree plot. The
scree plot can be used to determine the number k of principal components preserved in the
analysis, looking for the “elbow” or
the first important bend in the line. A biplot can also be generated
to represent the values of the first two principal components (PCs) and the
contribution of each variable to these components in the same plot (see Supplementary
Material of Cohen Freue et al. (2007)).
prcomp.robust
returns a list with class "prcomp"
containing the following components:
sdev |
the standard deviations of the principal components (i.e.,
the square roots of the eigenvalues of the covariance
matrix calculated using the robust argument, though the calculation is actually done with the singular
values of the data matrix). |
rotation |
the matrix of variable loadings (i.e., a matrix whose
columns contain the eigenvectors). The function princomp
returns this in the element loadings . |
x |
the value of the rotated data (the centered and scaled) data multiplied by the rotation matrix) is returned. |
Justin Harrington harringt@stat.ubc.ca and Gabriela V. Cohen Freue gcohen@stat.ubc.ca.
Cohen Freue, G. V. and Hollander, Z. and Shen, E. and Zamar, R. H. and Balshaw, R. and Scherer, A. and McManus, B. and Keown, P. and McMaster, W. R. and Ng, R. T. (2007) ‘MDQC: A New Quality Assessment Method for Microarrays Based on Quality Control Reports’. Bioinformatics 23, 3162 – 3169.
mdqc
, prcomp
data(allQC) ## Loads the dataset allQC prout <- prcomp.robust(allQC) screeplot(prout, type="line") biplot(prout) prout <- prcomp.robust(allQC, robust="MCD") screeplot(prout, type="line") biplot(prout) prout <- prcomp.robust(allQC, robust="MVE") screeplot(prout, type="line") biplot(prout)