Dear all,

I'm having a 410x410 correlation matrix, which looks like this
A B C D
A 1 0.1 0.2 0.3
B 0.1 1 0.4 0.5
C 0.2 0.4 1 0.6
D 0.3 0.5 0.6 1

For my further analysis, I want to transform it a bit so it looks like this
End-point 1 End-point 2 Correlation
A B 0.1
A C 0.2
A D 0.3
B C 0.4
B D 0.5
C D 0.6
With 2 criteria:
  • The correlation of one variable to itself (correlation=1, or A-A; B-B,....) is excluded
  • The combination of 2 end-point must not be repeated (or that A-B, A-C,... is unique)
The 2 end-points are interchangeable (or that A-B == B-A; C-A == A-C,..). And the order of the table does not have to follow alphabet order, as long as the combination of the 2 end-points are unique.

Any help is appreciated! I'm using Stata15!

Many thanks,
Best.