Hi All,
I am confused by how Stata is multiplying values across two matrices.
In the example below, the resulting values for all r X c = 8518, which is obviously not correct. The value for 69 * 69 (the r1/c1 * r1/c1) should be 4761... How do I get the correct results?
Thanks!
Ariel
I am confused by how Stata is multiplying values across two matrices.
In the example below, the resulting values for all r X c = 8518, which is obviously not correct. The value for 69 * 69 (the r1/c1 * r1/c1) should be 4761... How do I get the correct results?
Thanks!
Ariel
Code:
mat d = (69, 34, -51 \ 69, 34, -51 \ 69, 34, -51) mat dt = d'
Code:
. mat li d d[3,3] c1 c2 c3 r1 69 34 -51 r2 69 34 -51 r3 69 34 -51
Code:
. mat li dt dt[3,3] r1 r2 r3 c1 69 69 69 c2 34 34 34 c3 -51 -51 -51
Code:
. mat T = d * dt . mat li T symmetric T[3,3] r1 r2 r3 r1 8518 r2 8518 8518 r3 8518 8518 8518
Code:
. di (el(d,1,1) * el(dt,1,1)) 4761
Comment