Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[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 <>
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.


Roberto Liebscher
Catholic University of Eichstaett-Ingolstadt
Department of Business Administration
Chair of Banking and Finance
Auf der Schanz 49
D-85049 Ingolstadt
Phone:  (+49)-841-937-1929
FAX:    (+49)-841-937-2883

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!


De informatie verzonden in dit e-mail bericht is vertrouwelijk en is uitsluitend bestemd voor de geadresseerde van dit bericht. Lees verder: <>
The information in this e-mail message is confidential and may be legally privileged. Read more:<>

*   For searches and help try:

*   For searches and help try:

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