Hi all,

I want to add an additional row in a matrix, which displays the names of grouped columns. The code is:

Code:
. mat A = (1,2,3,1,2,3\ 4,5,6,4,5,6\ 7,8,9,7,8,9)
. matrix rownames A = myrow1 myrow2 myrow3
. mat colnames A = mycol1  mycol2  mycol3  mycol1  mycol2  mycol3
. mat coleq A = eq1 eq2
. mat li A

A[3,6]
                  eq1:          eq2 :          eq2 :          eq2 :          eq2 :          eq2 :
               mycol1         mycol2   mycol3          mycol2         mycol3         mycol3
myrow1              1              2              3              1              2              3
myrow2              4              5              6              4              5              6
myrow3              7              8              9              7              8              9
Is there a way to remove the colon and merge/combine top rownames so the appears as following:

Code:
                                     eq1                          eq2
                    mycol1       mycol2   mycol3          mycol1         mycol2         mycol3
myrow1              1              2              3              1              2              3
myrow2              4              5              6              4              5              6
myrow3              7              8              9              7              8              9
Thanks.