Usage
rda(x, ...)
## S3 method for class 'default':
rda(x, grouping = NULL, prior = NULL, gamma = NA,
lambda = NA, regularization = c(gamma = gamma, lambda = lambda),
crossval = TRUE, fold = 10, train.fraction = 0.5,
estimate.error = TRUE, output = FALSE, startsimplex = NULL,
max.iter = 100, trafo = TRUE, simAnn = FALSE, schedule = 2,
T.start = 0.1, halflife = 50, zero.temp = 0.01, alpha = 2,
K = 100, ...)
## S3 method for class 'formula':
rda(formula, data, ...)
Arguments
x
Matrix or data frame containing the explanatory variables
(required, if formula
is not given).
formula
Formula of the form groups ~ x1 + x2 + ...
.
data
A data frame (or matrix) containing the explanatory
variables.
grouping
(Optional) a vector specifying the class for
each observation; if not specified, the first column of
data
is taken.
prior
(Optional) prior probabilities for the classes.
Default: proportional to training sample sizes.
prior=1
indicates equally likely classes.
gamma, lambda, regularization
One or both of the rda-parameters may be fixed manually.
Unspecified parameters are determined by minimizing the
estimated error rate (see below).
crossval
Logical. If TRUE
, in the optimization
step the error rate is estimated by Cross-Validation,
otherwise by drawing several training- and test-samples.
fold
The number of Cross-Validation- or Bootstrap-samples
to be drawn.
train.fraction
In case of Bootstrapping: the fraction of
the data to be used for training in each Bootstrap-sample;
the remainder is used to estimate the misclassification rate.
estimate.error
Logical. If TRUE
, the apparent
error rate for the final parameter set is estimated.
output
Logical flag to indicate whether text output
during computation is desired.
startsimplex
(Optional) a starting simplex for the
Nelder-Mead-minimization.
max.iter
Maximum number of iterations for Nelder-Mead.
trafo
Logical; indicates whether minimization is carrried
out using transformed parameters.
simAnn
Logical; indicates whether Simulated Annealing
shall be used.
schedule
Annealing schedule 1 or 2 (exponential or polynomial).
T.start
Starting temperature for Simulated Annealing.
halflife
Number of iterations until temperature is reduced to a half (schedule 1).
zero.temp
Temperature at which it is set to zero (schedule 1).
alpha
Power of temperature reduction (linear, quadratic, cubic,...) (schedule 2).
K
Number of iterations until temperature = 0 (schedule 2).