Message-ID: <20051031065639.74833.qmail@web31608.mail.mud.yahoo.com>
Date: 2005-10-31T06:56:39Z
From: Srinivas Iyyer
Subject: Matrix operations please help
In-Reply-To: <43657589.6040606@stats.uwo.ca>
Dear Group,
I have a matrix (157 X 157 ) with correlation values.
I want to convert the unique elements into a long list
so that I can add an extra variable and plot them.
Example:
A B C D
alfa 1 0.3 0.8 -0.3
beta 0.2 1 -0.3 0.4
echo 0.9 -0.3 1 0.5
tang -0.5 0.5 0.4 1
I want to convert into this form:
alfa A 1
alfa B 0.3
alfa C 0.8
alfa D -0.3
beta A 0.2
beta B 1
beta C -0.3
beta D 0.4
.......
and so on.
I will add another variable afterwards:
var1 var2 corr var3
alfa A 1 grp1
alfa B 0.3 grp1
alfa C 0.8 grp2
alfa D -0.3 grp3
beta A 0.2 grp3
beta B 1 grp2
beta C -0.3 grp1
beta D 0.4 grp2
........ and so on....
I am sure there should be a way.. but I am completely
clueless..
Can any one help me please.
thanks
srini