Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: matrix to local


From   Thomas <[email protected]>
To   [email protected]
Subject   Re: st: matrix to local
Date   Mon, 27 Jun 2011 15:46:46 +0100

Dear Nick,

would you know how I get spaces between the values?

Thanks,

Thomas

On 27/06/2011 14:54, Nick Cox wrote:
Why?

It can be done, but I can't think of a good reason for doing it. N.B.
some loss of precision.

sysuse auto
regress mpg length turn weight
mat b = e(b)
forval i = 1/`=colsof(b)' {
      local B `B'  `=b[1,`i']'
}

Nick

On Mon, Jun 27, 2011 at 2:41 PM, Thomas<[email protected]>  wrote:

I am trying to have a local that captures the content of e(b). On this list
I found solutions for a single element but it does not work for the entire
matrix.

I am looking for something like:

mat A = e(b)

local c = A

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index