1
$\begingroup$

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

$\endgroup$
6
  • $\begingroup$ I'd guess it's the first that is mentioned. $\endgroup$ Jan 29, 2021 at 9:52
  • $\begingroup$ @Lewian perhaps. But what does the first one even mean? $\endgroup$ Jan 29, 2021 at 9:53
  • $\begingroup$ It means that the standard estimators (sample mean and sample covariance matrix) are plugged into the theoretical population formula for the discriminant functions/decision boundaries. $\endgroup$ Jan 29, 2021 at 9:57
  • $\begingroup$ @Lewian ahh, yes, I see $\endgroup$ Jan 29, 2021 at 9:58
  • $\begingroup$ I agree by the way that this is not clearly enough stated on the help page, and you may write to the package maintainer to amend this. $\endgroup$ Jan 29, 2021 at 9:59

1 Answer 1

0
$\begingroup$

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.

$\endgroup$
2
  • $\begingroup$ 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? $\endgroup$ Jan 29, 2021 at 13:05
  • 1
    $\begingroup$ 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) ` $\endgroup$ Jan 29, 2021 at 13:09

Not the answer you're looking for? Browse other questions tagged or ask your own question.