Thanks Nick. I will look into that and report back.
Ben
Ben Hoen
LBNL
Office: 845-758-1896
Cell: 718-812-7589
-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Nick Cox
Sent: Monday, January 14, 2013 7:39 PM
To: statalist@hsphsun2.harvard.edu
Subject: Re: st: creating and appending to a local table using results
stored in r()
Check out -statsby-:
. help statsby
Nick
On Mon, Jan 14, 2013 at 10:25 PM, Ben Hoen <bhoen@lbl.gov> wrote:
> 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.
*
* 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/
*
* 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/