<!doctype s-function-doc system "s-function-doc.dtd" [
<!entity % S-OLD "INCLUDE">
]
>
<s-function-doc>
<s-topics>
   <s-topic>discRob</s-topic>
</s-topics>

<s-title>
Robust Discriminant Analysis
</s-title>

<s-description>
Fit a robust linear or quadratic discriminant function to a
set of feature data.
</s-description>

<s-usage>
<s-old-style-usage>
discRob(formula, data=sys.parent(), family=Classical("homoscedastic"),
        frequencies, na.action=na.exclude, subset,
        prior= c("proportional", "uniform", "none"),
        method=c("svd", "choleski"), singular.tol=sqrt(.Machine$double.eps),
        estim="auto", cov.control=covRob.control(estim=estim), ...)
</s-old-style-usage>
</s-usage>

<s-args-required>
<s-arg name="formula">
a formula object, specifying the group variable and feature
variables, with the group variable on the left of a `~'
operator, and the feature variables, separated by +
operators, on the right. If <s-expression>data</s-expression>
is given, all names used in the formula should be defined as variables
in the data frame.
</s-arg>
</s-args-required>

<s-args-optional>
<s-arg name="data">
a data frame in which to interpret the variables named in
<s-expression>formula</s-expression>. Default is the calling
frame. This is commonly refered to as the training data for the
discriminant function.
</s-arg>

<s-arg name="family">
a <s-expression>family.discrim</s-expression> object. Currently,
only the <s-expression>Classical</s-expression> constructor with
its argument <s-expression>cov.structure</s-expression> equal to
"homoscedastic" or "heteroscedastic" is implemented.
</s-arg>

<s-arg name="frequencies">
a vector of observation frequencies.
</s-arg>

<s-arg name="na.action">
a function to filter missing data. This is applied to the model
frame after any subset argument has been used. The default
<s-expression>na.exclude</s-expression> is to delete the
observation if any missing values are found. A possible alternative
is <s-expression>na.fail</s-expression>, which generates an
error if any missing values are found.
</s-arg>

<s-arg name="subset">
expression specifying a row subset of the data to be used in the
fit (training data). This can be a logical vector, or a numeric
vector indicating which observation numbers are to be included, or
a character vector with the row names to be included. All
observations are included by default.
</s-arg>

<s-arg name="prior">
a character string or numerical vector specifying the prior
knowledge of the mixing proportions of each group. The acceptable
strings are as follows: "proportional", group of proportions
are the number of observations from each group divided  by the
total number of observations; "uniform", group proportions are one over
the number of groups; "none", exclude the mixing proportion from
the discriminant function. If <s-expression>prior</s-expression>
is a numerical vector, it must have a length equal to the number
of groups and its elements must be positive and sum to one.
</s-arg>

<s-arg name="method">
numerical method to be used to decompose the feature matrix of
covariances. The choices are "svd", singular value decomposition
(the default) and "choleski", Choleski decomposition.
</s-arg>

<s-arg name="singular.tol">
tolerance for determining existing linear dependencies among
the feature vectors.
</s-arg>

<s-arg name="estim">
the robust estimator used by covRob. The choices are: "mcd" for the Fast
MCD algorithm of Rousseeuw and Van Driessen, "donostah" for the
Donoho-Stahel projection based estimator, "M" for the constrained M
estimator provided by Rocke, "pairwiseQC" for the quadrant correlation
based pairwise estimator, and "pairwiseGK" for the Gnanadesikan-Kettenring
pairwise estimator. The default "auto" selects from "donostah", "mcd", and
"pairwiseQC" with the goal of producing a good estimate in a resonable
amount of time.
</s-arg>

<s-arg name="cov.control">
a list of control parameters to be used in the numerical algorithms. See
covRob.control for the possible control parameters and their default
settings.
</s-arg>
</s-args-optional>

<s-value>
an object of class <s-expression>discRob</s-expression> that contains the
robust discriminant function
</s-value>

<s-see>
<s-function name="discrim.sgm">discrim</s-function>,
<s-function name="covRob.control.sgm">covRob.control</s-function>.
</s-see>

<s-examples>
<s-example type = text>
discRob(Group ~ ., data = hemo.cont, family = Classical("heter"))
</s-example>
</s-examples>

<s-keywords>
<s-keyword>librobust</s-keyword>
<s-keyword>robust</s-keyword>
<s-keyword>multivariate</s-keyword>
</s-keywords>

<s-docclass>
function
</s-docclass>

</s-function-doc>
