LDA | R Documentation |
Perform linear discriminant analysis
LDA(
formula,
data = NULL,
subset = NULL,
weights = NULL,
prior = "Observed",
missing = "Exclude cases with missing data",
output = "Means",
outcome.color = "#5B9BD5",
predictors.color = "#ED7D31",
variance = "moment",
seed = 12321,
auxiliary.data = NULL,
show.labels = FALSE,
use.combined.scatter = FALSE,
...
)
formula |
A formula of the form |
data |
A |
subset |
An optional vector specifying a subset of observations to be
used in the fitting process, or, the name of a variable in |
weights |
An optional vector of sampling weights, or the
name of a variable in |
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 "Equal" 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. |
missing |
How missing data is to be treated in the regression. Options:
|
output |
One of |
outcome.color |
Color used to display centroids in |
predictors.color |
Color used to display variable correlations in |
variance |
The method used to estimate the variance; either |
seed |
The random number seed used in imputation. |
auxiliary.data |
A |
show.labels |
Shows the variable labels, as opposed to the labels, in the outputs, where a variable's label is an attribute (e.g., attr(foo, "label")). |
use.combined.scatter |
Draw scatterplots using rhtmlCombinedScatter. |
... |
Additional argments to be past to |
Imputation (replace missing values with estimates): All selected
outcome and predictor variables are included in the imputation, along with
all auxiliary.data
, excluding cases that are excluded via subset or
have invalid weights, but including cases with missing values of the outcome variable.
Then, cases with missing values in the outcome variable are excluded from
the analysis (von Hippel 2007). See Imputation
.
von Hippel, Paul T. 2007. "Regression With Missing Y's: An Improved Strategy for Analyzing Multiply Imputed Data." Sociological Methodology 37:83-117. White, H. (1980), A heteroskedastic-consistent covariance matrix estimator and a direct test of heteroskedasticity. Econometrica, 48, 817-838. Long, J. S. and Ervin, L. H. (2000). Using heteroscedasticity consistent standard errors in the linear regression model. The American Statistician, 54(3): 217-224.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.