Bookmark and Share

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]

st: creating and appending to a local table using results stored in r()


From   "Ben Hoen" <[email protected]>
To   <[email protected]>
Subject   st: creating and appending to a local table using results stored in r()
Date   Mon, 14 Jan 2013 17:25:28 -0500

I have a loop (e.g., forvalues i=1/4 {...) that will run a regression (using
areg) across  different subsets of data and then estimate a linear
combination of the regression coefficients from that subset.

I would like to take the results stored in r() [specifically r(estimate) and
r(se) from lincom] and a value calculated from those two [e.g., local tstat
= r(estimate)/ r(se)] and store those three values in a table for each
subset.  Once the loop has run through all subsets I would like to display
the table.  

I imagine the table looking like this:

group	est	se	tstat
1	0.06	0.023	2.61
2	0.11	0.09	1.22
3	0.02	0.06	0.33
4	0.05	0.04	1.25

Any advice would be very appreciated.

Thanks, in advance,

Ben


Ben Hoen
Principal Research Associate
Lawrence Berkeley National Laboratory
Office: 845-758-1896
Cell: 718-812-7589
[email protected]
http://emp.lbl.gov/staff/ben-hoen

Visit our publications at: 
http://emp.lbl.gov/publications




*
*   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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index