LDA.fit | R Documentation |
LDA.fit
Fits linear discriminant analysis models.LDA.fit
Fits linear discriminant analysis models.
LDA.fit(
x,
grouping,
prior = proportions,
tol = 1e-04,
method = c("moment", "mle"),
weights = NULL,
CV = FALSE,
nu = 5,
labels = NULL,
functions.output = FALSE,
...
)
x |
A matrix or data frame of explanatory variables. |
grouping |
A variable containg the group memberships (i.e., to be predicted or explained by x). |
prior |
The assumed probability of each value of y occurring in the population. By default this is set to "observed" and the value is computed based on the observed data. If set to "constant" the prior will be set to be equal for each group (this is the default in SPSS). Alternatively, a vector of probabilities can be provided. |
tol |
Tolerance to decide if a matrix is singular. |
method |
The method used to estimate the variance; either |
weights |
An optional vector of sampling weights. |
CV |
Not used. |
nu |
the number of left singular vectors to be computed. |
labels |
The labels of the predictor variables. |
functions.output |
Logical; whether the discriminant functions are the
required output of |
... |
Additional arguments. |
This is a wrapper for MASS::lda and MASS::qda. #### Linear discriminant analysis ##### http://www.ats.ucla.edu/stat/spss/output/SPSS_discrim.htm
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.