Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

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

Re: st: matrix to local

From   Nick Cox <>
Subject   Re: st: matrix to local
Date   Mon, 27 Jun 2011 14:54:46 +0100


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']'


On Mon, Jun 27, 2011 at 2:41 PM, Thomas <> 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:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index