Usage
PcaNA(x, ...)
"PcaNA"(x, k = ncol(x), kmax = ncol(x), conv=1e-10, maxiter=100, method=c("cov", "locantore", "hubert", "grid", "proj", "class"), cov.control=NULL, scale = FALSE, signflip = TRUE, crit.pca.distances = 0.975, trace=FALSE, ...)
"PcaNA"(formula, data = NULL, subset, na.action, ...)
Arguments
formula
a formula with no response variable, referring only to
numeric variables.
data
an optional data frame (or similar: see
model.frame) containing the variables in the
formula formula. subset
an optional vector used to select rows (observations) of the
data matrix x.
na.action
a function which indicates what should happen
when the data contain NAs. The default is set by
the na.action setting of options, and is
na.fail if that is unset. The default is na.omit. ...
arguments passed to or from other methods.
x
a numeric matrix (or data frame) which provides
the data for the principal components analysis.
k
number of principal components to compute. If k is missing,
or k = 0, the algorithm itself will determine the number of
components by finding such k that $l_k/l_1 >= 10.E-3$ and
$\Sigma_{j=1}^k l_j/\Sigma_{j=1}^r l_j >= 0.8$.
It is preferable to investigate the scree plot in order to choose the number
of components and then run again. Default is k=ncol(x).
kmax
maximal number of principal components to compute.
Default is kmax=10. If k is provided, kmax
does not need to be specified, unless k is larger than 10.
conv
convergence criterion for the EM algorithm.
Default is conv=1e-10.
maxiter
maximal number of iterations for the EM algorithm.
Default is maxiter=100.
method
which PC method to use (classical or robust) - "class" means classical PCA
and one of the following "locantore", "hubert", "grid", "proj", "cov" specifies a
robust PCA method. If the method is "cov" - i.e. PCA based on a robust covariance matrix -
the argument cov.control can specify which method for computing the
(robust) covariance matrix will be used.
Default is method="locantore".
cov.control
control object in case of robust PCA based on a robust covariance matrix.
scale
a logical value indicating whether the variables should be
scaled to have unit variance (only possible if there are no constant
variables). As a scale function mad is used but alternatively, a vector of length equal
the number of columns of x can be supplied. The value is passed to
scale and the result of the scaling is stored in the scale slot.
Default is scale = FALSE
signflip
a logical value indicating wheather to try to solve the sign indeterminancy of the loadings -
ad hoc approach setting the maximum element in a singular vector to be positive. Default is signflip = FALSE
crit.pca.distances
criterion to use for computing the cutoff values for the orthogonal and score distances. Default is 0.975.
trace
whether to print intermediate results. Default is trace = FALSE