1

I am asking this question to help me with this bountied question.

The Wikipedia article for LDA describes three discrimination rules: Maximum likelihood, Bayes discriminant rule, and Fisher's linear discriminant rule.

The function definitions for the lda() and qda() R functions (from the MASS package) have a method argument:

enter image description here

However, I cannot find any source that specifies what the default method used for these functions is. So what is the default method used for these functions? (If you read my bountied question, you'll be able to understand why I'm trying to understand the default method.)

The Pointer
  • 1,064
  • 13
  • 35

1 Answers1

0

Yes, this is not clearly enough stated on the help page (but maybe in the book), but here is how you can find out: type the R prompt:

library(MASS)
 MASS:::lda.default
function (x, grouping, prior = proportions, tol = 1e-04, method = c("moment", 
    "mle", "mve", "t"), CV = FALSE, nu = 5, ...) 
 ...

and look at the method = argument. As always in R, the first value mentioned is the default.

kjetil b halvorsen
  • 63,378
  • 26
  • 142
  • 467
  • Thanks for the answer. It prints out exactly the same thing `function (x, grouping, prior = proportions, tol = 1e-04, method = c("moment", "mle", "mve", "t"), CV = FALSE, nu = 5, ...)`, and then what looks like source code. So the first value in the vector (seems to be `moment`) is the default? – The Pointer Jan 29 '21 at 13:05
  • 1
    YES. And, this is the standard way in R, at the prompt, to investigate the source code. Alternatively, to get less output, type ` args(MASS:::lda.default) ` – kjetil b halvorsen Jan 29 '21 at 13:09