On Thu, 09 Jun 2005 17:39:45 +0800, David Fisher <[email protected]>
wrote:
Is there a command in Stata that will store the coefficients (a and b)
from a linear regression in new, separate variables? I've looked at
"predict" and similar, but I can only find how to extract residuals and
fitted values.
Would the following do the job?
. sysuse auto
(1978 Automobile Data)
. regress mpg we
[output cut]
. local b = _b[_cons]
. local a = _b[weight]
. di `a'
-.00600869
. di `b'
39.440284
--
Philippe
*
* 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/