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 Liebscher <[email protected]>
To   [email protected]
Subject   Re: st: how to store all estimates of a regression by group
Date   Wed, 26 Feb 2014 20:04:17 +0100

You can simply loop over all your groups and restrict each estimation to observations of the particular group. For instance:

webuse nlswork
xtset idcode
forvalues i=1(1)3 {
xtreg ln_w age c.age#c.age ttl_exp c.ttl_exp#c.ttl_exp tenure c.tenure#c.tenure if race == `i', fe
estimates store reg`i'
}
estimates table reg1 reg2 reg3

In my example race works as the group variable.

HTH,
Roberto

--
Roberto Liebscher
Catholic University of Eichstaett-Ingolstadt
Department of Business Administration
Chair of Banking and Finance
Auf der Schanz 49
D-85049 Ingolstadt
Germany
Phone:  (+49)-841-937-1929
FAX:    (+49)-841-937-2883
E-mail:   [email protected]
Internet: http://www.ku.de/wwf/lfb/



Am 23.02.2014 11:24, schrieb Riccardo Valboni:
Dear statalist,

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?

Many thanks for your help!

Riccardo


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