Displaying 1 result from an estimated 1 matches for "mkhondok".
2009 Jan 06
0
Singularity of lda function in MASS package
...or
two class problems shows collinearity for p > n-2.
Does anyone know why this is the case? Does lda (MASS) use a
different algorithm?
#Question2:
#=========
When I plot leave-one-out CV based on lda (averaged over
500 simulated data sets), I see a pick (see the link
http://homepages.ed.ac.uk/mkhondok/temp/lda_R-help-CV.png )
at p = n-3 (not n-2!). I would appreciate if someone could help me get
an explanation for this behaviour.
## R code
## Reproducible example
library(MASS)
# n: sample size
# p: number of variables
## Function
## --------
test.fun<-function(n,p){
x<-matrix (rnorm(n...