I have a large inconsistent dataset that has a bunch of highly correlating variables. What I want to is reduce the amount of correlating variables that correlate above a threshold of 0.7. However, I want the selected/remaining variable to be the one that had the strongest correlation with a pre-defined variable. For example, *x* as that selected variable the following correlation matrix:

```
     x      y      z      m 
 x 1      0.1    0.2    0.3
 y 0.1    1      0.9    0.11   
 z 0.2    0.9    1      0.6
 m 0.3    0.11   0.60   1

```

Should be reduced to:

```
     x      z     m 
 x 1      0.2   0.3
 z 0.2      1   0.6
 m 0.3   0.60     1

```

Because *z* and *y* surpass the 0.7 threshold and *z* correlates stronger with *x* than *y*.