Quadratic discriminant analysis.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 
formula 
A formula of the form 
data 
Data frame from which variables specified in 
x 
(required if no formula is given as the principal argument.) a matrix or data frame or Matrix containing the explanatory variables. 
grouping 
(required if no formula principal argument is given.) a factor specifying the class for each observation. 
prior 
the prior probabilities of class membership. If unspecified, the class proportions for the training set are used. If specified, the probabilities should be specified in the order of the factor levels. 
subset 
An index vector specifying the cases to be used in the training sample. (NOTE: If given, this argument must be named.) 
na.action 
A function to specify the action to be taken if 
method 

CV 
If true, returns results (classes and posterior probabilities) for leaveoutout crossvalidation. Note that if the prior is estimated, the proportions in the whole dataset are used. 
nu 
degrees of freedom for 
... 
arguments passed to or from other methods. 
Uses a QR decomposition which will give an error message if the withingroup variance is singular for any group.
an object of class "qda"
containing the following components:
prior 
the prior probabilities used. 
means 
the group means. 
scaling 
for each group 
ldet 
a vector of half log determinants of the dispersion matrix. 
lev 
the levels of the grouping factor. 
terms 
(if formula is a formula) an object of mode expression and class term summarizing the formula. 
call 
the (matched) function call. 
unless CV=TRUE
, when the return value is a list with components:
class 
The MAP classification (a factor) 
posterior 
posterior probabilities for the classes 
Venables, W. N. and Ripley, B. D. (2002) Modern Applied Statistics with S. Fourth edition. Springer.
Ripley, B. D. (1996) Pattern Recognition and Neural Networks. Cambridge University Press.
1 2 3 4 5 6 
Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
Please suggest features or report bugs with the GitHub issue tracker.
All documentation is copyright its authors; we didn't write any of that.