PCA : how to cluster data to differenciate my data the most while considering their groups I have to do a PCA in R for a project, but I have 300 data in 15 differents groups, and I want to find the reduced space which gives me the most variability between the groups and cluster my data in their own group ( so not between all the data) so I can do an analysis later while using these variables (I have 4000 very similar variables).
I know how to do the analysis when I want to cluster data that are not already in a group, but I don't know how to do it when I want to find out which variable can separate my groups the best.
The objective is that I use the reduced space that explain the most of the group variability to use them to do analysis, to observe if the data groups are really significantly different when I consider all the data, but I'm not sure if it's actually something possible to do with a ACP.
Thank you!


There are classical discriminant coordinates, closely related to Fisher's discriminant analysis, that project the data on a low (e.g., 2-d) hyperplane in such a way that ratio between the variation between class means and the variation within classes is maximum. This will give you an, in a well defined sense, optimal 2-d plot separating the clusters. There are also some versions of this taking robustness against outliers into account.
This is implemented in the R-functions plotcluster and discrcoord in my fpc package, see also references on the help pages.
