Skip to content
Prev 269100 / 398502 Next

display only the top-right half of a correlation matrix?

Dear all
Is there an easy way to display only one half (top-right or
bottom-left) of a correlation matrix?
mpg   cyl  disp    hp
mpg   1.00 -0.85 -0.85 -0.78
cyl  -0.85  1.00  0.90  0.83
disp -0.85  0.90  1.00  0.79
hp   -0.78  0.83  0.79  1.00

n= 32


P
     mpg cyl disp hp
mpg       0   0    0
cyl   0       0    0
disp  0   0        0
hp    0   0   0


Since the two sides are identical, there is little value in having
both displayed at the same time. Moreover, it considerably slows down
the inspection of the results.

Thank you
Liviu