Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: create submatrix from estimates


From   Kit Baum <[email protected]>
To   [email protected]
Subject   st: create submatrix from estimates
Date   Sat, 14 Oct 2006 14:01:58 -0400

. webuse grunfeld

. xi: qui regress invest mvalue kstock I.company

. mat beta=e(b)

. mat slope=beta[1,1..2]

. mat rest = beta[1,3..12]

. mat list beta

beta[1,12]
mvalue kstock _Icompany_2 _Icompany_3 _Icompany_4
y1 .1101238 .31006534 172.20251 -165.27514 42.487396

_Icompany_5 _Icompany_6 _Icompany_7 _Icompany_8 _Icompany_9
y1 -44.320126 47.135393 3.7432122 12.751033 -16.925585

_Icompany_10 _cons
y1 63.728842 -70.296685

. mat list slope

slope[1,2]
mvalue kstock
y1 .1101238 .31006534

. mat list rest

rest[1,10]
_Icompany_2 _Icompany_3 _Icompany_4 _Icompany_5 _Icompany_6
y1 172.20251 -165.27514 42.487396 -44.320126 47.135393

_Icompany_7 _Icompany_8 _Icompany_9 _Icompany_10 _cons
y1 3.7432122 12.751033 -16.925585 63.728842 -70.296685




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/




© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index