LDA.fit: 'LDA.fit' Fits linear discriminant analysis models.

LDA.fitR Documentation

LDA.fit Fits linear discriminant analysis models.

Description

LDA.fit Fits linear discriminant analysis models.

Usage

LDA.fit(
  x,
  grouping,
  prior = proportions,
  tol = 1e-04,
  method = c("moment", "mle"),
  weights = NULL,
  CV = FALSE,
  nu = 5,
  labels = NULL,
  functions.output = FALSE,
  ...
)

Arguments

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 "moment" for the method of moments or "mle" for maximum likelihood estimaion.

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 LDA.

...

Additional arguments.

Details

This is a wrapper for MASS::lda and MASS::qda. #### Linear discriminant analysis ##### http://www.ats.ucla.edu/stat/spss/output/SPSS_discrim.htm


Displayr/flipMultivariates documentation built on Feb. 26, 2024, 12:39 a.m.