[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: vec of upper triangle
Edwin wants to put the upper triangle of a (symmetric?) matrix into a
vector:
. mat list Ed
symmetric Ed[3,3]
c1 c2 c3
r1 1
r2 2 4
r3 3 5 6
. mata: st_matrix("Edv",vech(st_matrix("Ed")))
. mat list Edv
Edv[6,1]
c1
r1 1
r2 2
r3 3
r4 4
r5 5
r6 6
Kit Baum, Boston College Economics
http://ideas.repec.org/e/pba1.html
An Introduction to Modern Econometrics Using Stata:
http://www.stata-press.com/books/imeus.html
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/