This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Calculate Correlation Based On Distance

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

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.

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

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.

0 answers

No answers yet.

Log in to answer this question.