[R] Discriminant analysis - stepwise procedure

Uwe Ligges ligges at statistik.tu-dortmund.de
Wed Mar 25 16:56:30 CET 2009



Jose Antonio wrote:
> Dear R users,
> 
> I have some environmental variables and I need to find the best combination
> of them in order to separate two main groups (coded 1 and 2). I have
> performed a discriminant analysis using the stepclass function as a method
> for selecting the most relevant environmental variables.
> 
> The problem is that this function includes a parameter (start.vars) and my
> results change a lot when I change this variable...Oh my God!!! Then, one
> possible functionl is not the best for my data...
> 
> grupo<-stepclass(GROUP~W1+W2+W3+W4+W5+W6+W7+W8+W9+W10, data=BD,
> method="lda", start.vars = "W1", criterion = "AS", direction = "forward")
 >
> I have performed a redundancy analysis first, then there is not highly
> correlated variables in the variables that I include in the stepclass
> function.
> 
> Can anybody help me???

Not sure if you really want criterion = "AS".
Anyway, if your variables are almost equally good (or bad) to improve 
the criterion and you have not very much data, then it might happen that 
the criterion works equally well for different variables and the one 
that is first on your list gets selected first (we do not break "ties").

And hence, after a different variable is selected at first, this 
influences the variables chosen in the second step. Hence it is not that 
surprising what you observed.

Uwe Ligges





> Thank you very much
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.




More information about the R-help mailing list