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 at the end of May, and its replacement, statalist.org is already up and running.


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

Re: st: matrix to local


From   Thomas <thomas.triebs@cantab.net>
To   statalist@hsphsun2.harvard.edu
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.

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<thomas.triebs@cantab.net>  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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index