library(gtools)
z <- combinations(ncol(DF), 3)
maxcor <- function(x) max(as.vector(as.dist(cor(DF[,x]))))
names(DF)[z[which.min(apply(z, 1, maxcor)),]]
Gabor Grothendieck a ?crit :
>Are there any R packages that relate to the
>following data reduction problem fo finding
>maximally independent variables?
>
>Currently what I am doing is solving the following
>minimax problem: Suppose we want to find the
>three maximally independent variables. From the
>full n by n correlation matrix, C, of all n variables
>chooose three variables and form their 3 by 3 correlation
>submatrix, C1, finding the offdiagonal entry of C1
>which is largest in absolute value. Call that z. Thus for
>each set of 3 variables we can associate such a z.
>Now for each possible set of three variables find the one for
>which its value of z is least.
>
>I only give the above formulation because that is
>what I am doing now but I would be happy to
>consider other different formulations.
>
>______________________________________________
>R-help at stat.math.ethz.ch mailing list
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html
>
>
>