Hi,
Maybe it is not directly related to R but sine many are statistical experts so 
I post it here for help:

I have two variables (say x and y) of length n. Now the cor(x,y) is close to 0. 
I need to find the subset in {1,.. n} so that the correlation between x and y 
using the subset data is maximized. A trivial choice would be selecting 2 
individuals only so that cor(x,y) =1. As the size of the subset increases, 
cor(x,y) will go down to 0, but I am assuming the best correlation for each 
size of the subsets would not be monotonically decreasing.

Any idea of how to find the solution?

Thanks,
Jing

                                          
        [[alternative HTML version deleted]]

______________________________________________
R-help@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.

Reply via email to