MacroPCA | R Documentation |
This function performs the MacroPCA algorithm, which can deal with Missing values and Cellwise
and Rowwise Outliers. Note that this function first calls checkDataSet
and analyzes the remaining cleaned data.
MacroPCA(X, k = 0, MacroPCApars = NULL)
X |
|
k |
|
MacroPCApars |
A list of available options detailed below. If MacroPCApars = NULL the defaults below are used.
|
A list with components:
MacroPCApars |
the options used in the call. |
remX |
Cleaned data after |
DDC |
results of the first step of MacroPCA. These are needed to run MacroPCApredict on new data. |
scaleX |
the scales of the columns of |
k |
the number of principal components. |
loadings |
the columns are the |
eigenvalues |
the |
center |
vector with the center. |
alpha |
|
h |
|
It |
number of iteration steps. |
diff |
convergence criterion. |
X.NAimp |
data with all |
scores |
scores of |
OD |
orthogonal distances of the rows of |
cutoffOD |
cutoff value for the OD. |
SD |
score distances of the rows of |
cutoffSD |
cutoff value for the SD. |
highOD |
row numbers of cases whose |
highSD |
row numbers of cases whose |
residScale |
scale of the residuals. |
stdResid |
standardized residuals. Note that these are |
indcells |
indices of cellwise outliers. |
NAimp |
various results for the NA-imputed data. |
Cellimp |
various results for the cell-imputed data. |
Fullimp |
various result for the fully imputed data. |
Rousseeuw P.J., Van den Bossche W.
Hubert, M., Rousseeuw, P.J., Van den Bossche W. (2019). MacroPCA: An all-in-one PCA method allowing for missing values as well as cellwise and rowwise outliers. Technometrics, 61(4), 459-473. (link to open access pdf)
checkDataSet
, cellMap
,
DDC
library(MASS)
set.seed(12345)
n <- 50; d <- 10
A <- matrix(0.9, d, d); diag(A) = 1
x <- mvrnorm(n, rep(0,d), A)
x[sample(1:(n * d), 50, FALSE)] <- NA
x[sample(1:(n * d), 50, FALSE)] <- 10
MacroPCA.out <- MacroPCA(x, 2)
cellMap(MacroPCA.out$stdResid)
# For more examples, we refer to the vignette:
## Not run:
vignette("MacroPCA_examples")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.