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   Thomas <>
Subject   Re: st: matrix to local
Date   Mon, 27 Jun 2011 15:28:08 +0100

Dear Nick,

thanks. I want to use the OLS coefficients as starting values for a ML estimator.


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

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

I am looking for something like:

mat A = e(b)

local c = A

*   For searches and help try:

*   For searches and help try:

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