Any idea what's going with matric D1 and F1 in below. I have a matric D1 which contains some post estimation of from a margins command. But when I tried to get the column number of 1._at#1.Treatment in D1, the STATA issues a error message. But if I go one step further to let another mat F1 to be the same as D1 (mat F1=D1), it won't have problem with F1 for the same operation. What is going on?
. mat list D1
D1[9,6]
1._at# 1._at# 1._at# 2._at# 2._at# 2._at#
1.Treatment 2.Treatment 3.Treatment 1.Treatment 2.Treatment 3.Treatment
b .97819882 1.1457846 1.0719707 .75463889 .96552951 .88649156
se .01749367 .03349974 .03991627 .01724896 .03304899 .03991627
z 55.917298 34.20279 26.855479 43.749819 29.215101 22.208775
pvalue 0 2.20e-256 7.28e-159 0 1.25e-187 2.83e-109
ll .94391186 1.0801263 .99373623 .72083155 .90075468 .8082571
ul 1.0124858 1.2114429 1.1502052 .78844623 1.0303043 .96472602
df . . . . . .
crit 1.959964 1.959964 1.959964 1.959964 1.959964 1.959964
eform 0 0 0 0 0 0
. global aa=colnumb(D1, "1._at#1.Treatment")
type mismatch
r(109);
.
. mat F1=D1
. global aa=colnumb(F1, "1._at#1.Treatment")
. di "$aa"
1
. mat list D1
D1[9,6]
1._at# 1._at# 1._at# 2._at# 2._at# 2._at#
1.Treatment 2.Treatment 3.Treatment 1.Treatment 2.Treatment 3.Treatment
b .97819882 1.1457846 1.0719707 .75463889 .96552951 .88649156
se .01749367 .03349974 .03991627 .01724896 .03304899 .03991627
z 55.917298 34.20279 26.855479 43.749819 29.215101 22.208775
pvalue 0 2.20e-256 7.28e-159 0 1.25e-187 2.83e-109
ll .94391186 1.0801263 .99373623 .72083155 .90075468 .8082571
ul 1.0124858 1.2114429 1.1502052 .78844623 1.0303043 .96472602
df . . . . . .
crit 1.959964 1.959964 1.959964 1.959964 1.959964 1.959964
eform 0 0 0 0 0 0
. global aa=colnumb(D1, "1._at#1.Treatment")
type mismatch
r(109);
.
. mat F1=D1
. global aa=colnumb(F1, "1._at#1.Treatment")
. di "$aa"
1
Comment