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: extracting coefficients from an -estimates- table
From 
 
daniel klein <[email protected]> 
To 
 
"[email protected]" <[email protected]> 
Subject 
 
Re: st: extracting coefficients from an -estimates- table 
Date 
 
Thu, 13 Feb 2014 17:53:08 +0100 
Ariel, I might misunderstand or simplify the problem at hand, but you
get this difference (and an additional significance test) from
. regress price c.mpg##i.foreign
. di _b[1.foreign#c.mpg]
Ask for a straight forward way, in the sense of e.g. -get()-, to
extract the values from -r(coef)-, I am not aware of such a command.
What you want is probably programmable with a few lines of code,
though. We would of course need a more detailed explanation beyond the
stylized example to illustrate the point.
Best
Daniel
-- 
Hi All,
I would like to extract some values from stored estimates, but I am not sure
if there is a straightforward way other than extracting the values from the
r(coef) matrix? In the example below, I'd like to do the equivalent of :
domestic[mpg] - foreign[mpg]
****example*****
. sysuse auto
. regress price mpg if foreign==0
. estimate store domestic
. regress price mpg if foreign==1
. estimate store foreign
. estimate table domestic foreign
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/