Calculate Correlation Based On Distance
0
0
Entering edit mode
12.4 years ago

Hi I have a set of regulatory factors separated by distance in a matrix form as follows

A B C D 
A|0|1|2|9 
B|1|0|3|6     
C|2|5|0|1
D|3|5|1|0

I want to identify the correlation based on their distances (values in matrix represent the distances). i,e., if the distance between the pair is more we expect the correlation to be little lower than the pair with less distance. How to do this

correlation matrix r • 3.1k views
ADD COMMENT
0
Entering edit mode

That is not possible, given how correlation is calculated. Calculate correlation based on original values. Also, if the distance is edit distance of sequences, then you cannot calculate correlation at all.

ADD REPLY
0
Entering edit mode

then how about the clustering? i want to group them based on the distance

ADD REPLY
2
Entering edit mode

Yes, you can do that with a distance matrix, at least for hierarchical clustering, see ?hclust. Other methods, which require the original data, like k-means are not aplicable.

ADD REPLY

Login before adding your answer.

Traffic: 4951 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6