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]

Re: st: how to store all estimates of a regression by group


From   Roberto Ferrer <[email protected]>
To   Stata Help <[email protected]>
Subject   Re: st: how to store all estimates of a regression by group
Date   Sun, 23 Feb 2014 12:42:59 -0430

Riccardo,

Another way:

*-------------------- begin code ----------------
clear all
set more off

sysuse auto

levelsof foreign, local(lev)

foreach i of local lev {
    regress mpg weight displacement if foreign == `i'
    estimates store perf`i'
}

estimates dir

*------------------- end code --------------------


-foreign- would be your -group- variable.

On Sun, Feb 23, 2014 at 10:32 AM, Riccardo Valboni <[email protected]> wrote:
> Dear Maarten,
>
> It did help, thank you very much. Using statsby I managed to run the regressions the way I wanted. The only drawback of statsby is that it gives back the results in a very strange format. I wanted to supply the coefficients and CI of the regressions to coefplot and estout but I am finding it very hard. Do you know if there is a way I can get these two packages recognize coefficients stored in a statsby table as regression coefficients?
>
> Thank you for your help.
> Riccardo
>
> -----Original Message-----
> From: [email protected] [mailto:[email protected]] On Behalf Of Maarten Buis
> Sent: domenica 23 febbraio 2014 15:44
> To: [email protected]
> Subject: Re: st: how to store all estimates of a regression by group
>
> On Sun, Feb 23, 2014 at 11:24 AM, Riccardo Valboni wrote:
>> I am running a simple panel data regression with fixed effects. I am running it by group using the following command
>>
>> by group: xtreg performance i.year i.type age size, fe
>>
>> estimates store perf1
>>
>> However, when I retrieve the estimates with estimates replay the stata gives back those for the last estimated group only. How can I get stata store and retrieve the coefficients for all groups? How can I then combine them in a unique table? Is estout suitable for this?
>
> See: -help statsby-.
>
> Hope this helps,
> Maarten
>
> ---------------------------------
> Maarten L. Buis
> WZB
> Reichpietschufer 50
> 10785 Berlin
> Germany
>
> http://www.maartenbuis.nl
> ---------------------------------
>
> *
> *   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/
>
> Disclaimer
> ________________________________
> De informatie verzonden in dit e-mail bericht is vertrouwelijk en is uitsluitend bestemd voor de geadresseerde van dit bericht. Lees verder: www.eur.nl/email-disclaimer <http://www.eur.nl/email-disclaimer>
> The information in this e-mail message is confidential and may be legally privileged. Read more: www.eur.nl/english/email-disclaimer<http://www.eur.nl/english/email-disclaimer>
> ________________________________
>
>
> *
> *   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/


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