Hi all,
So I have a vector (421x1) that contains all the variables from the 421x421 matrix. (uploaded as excel file: mat_vector_1990.xlsx)
For instance.. the matrix below, where n=421.
a11 a12 .... a1n
a21 a22 .... a2n
....
an1 an2 .... ann
However, as the matrix is a non-directional matrix, the upper half is uncoded (lower triangular matrix) and each element was converted into a single column as below:
a11
a21
...
an1
a22
a32
...
ann
I've included a picture by hand to explain as well.

Now I want to convert the vector to a lower triangular matrix.
So what I would like to create is, the first column having the first 421 entries of the vector data, second column having the next 420 data entries(first cell missing, though It doesn't matter if it is filled the correct value), third column having 419 data entries.. and so on to create the 421x421 matrix again.
I googled and searched the forum, but couldn't find solution to how I could work this out. I'm using Stata 14/MP and any hint or help would really be appreciated.
Thanks in advance!
John
So I have a vector (421x1) that contains all the variables from the 421x421 matrix. (uploaded as excel file: mat_vector_1990.xlsx)
For instance.. the matrix below, where n=421.
a11 a12 .... a1n
a21 a22 .... a2n
....
an1 an2 .... ann
However, as the matrix is a non-directional matrix, the upper half is uncoded (lower triangular matrix) and each element was converted into a single column as below:
a11
a21
...
an1
a22
a32
...
ann
I've included a picture by hand to explain as well.
Now I want to convert the vector to a lower triangular matrix.
So what I would like to create is, the first column having the first 421 entries of the vector data, second column having the next 420 data entries(first cell missing, though It doesn't matter if it is filled the correct value), third column having 419 data entries.. and so on to create the 421x421 matrix again.
I googled and searched the forum, but couldn't find solution to how I could work this out. I'm using Stata 14/MP and any hint or help would really be appreciated.
Thanks in advance!
John
Comment