Usage
CSimca(x, ...)
"CSimca"(x, grouping, prior=proportions, k, kmax = ncol(x), tol = 1.0e-4, trace=FALSE, ...)
"CSimca"(formula, data = NULL, ..., subset, na.action)
Arguments
formula
a formula of the form y~x
, it describes the response
and the predictors. The formula can be more complicated, such as
y~log(x)+z
etc (see formula
for more details).
The response should
be a factor representing the response variable, or any vector
that can be coerced to such (such as a logical variable). 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 NA
s. The default is set by
the na.action
setting of options
, and is
na.fail
if that is unset. The default is na.omit
. x
a matrix or data frame containing the explanatory variables (training set).
grouping
grouping variable: a factor specifying the class for each observation.
prior
prior probabilities, default to the class proportions for the training set.
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=0
.
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.
trace
whether to print intermediate results. Default is trace = FALSE
...
arguments passed to or from other methods.