From | "Michael Blasnik" <[email protected]> |
To | <[email protected]> |
Subject | st: Re: replacing a scalar from mat |
Date | Tue, 12 Jul 2005 14:33:12 -0400 |
I am trying to get a scalar from a matrix (vector). Within a multiple equations framework (-mlogit-) I want to get one of the parameters estimated. After running -mlogit- I tried the following:
mat B = e(b)
scalar s = B["y1","eq1:x1"]
The following error appears:
matrix operators that return matrices not allowed in this context
r(509);
However if I try one of the following, there is no error reported:
mat A = B["y1","eq1:x1"]
scalar s = B[1,1]
Using the rows and columns names of the matrix is important since these scalars will be replaced into a second vector of estimated parameters.
Thanks,
Rafa
* * 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 |