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 |
- 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)
Any help is appreciated! I'm using Stata15!
Many thanks,
Best.
0 Response to Transforming data in a Correlation Matrix
Post a Comment