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: RE: Areg, absorb

From   Christopher Baum <>
To   "" <>
Subject   Re: st: RE: Areg, absorb
Date   Tue, 12 Apr 2011 07:02:41 -0400

On Apr 12, 2011, at 2:33 AM, Jan wrote:

> Would it not be possible for you to first generate group id's based on country1 country2 and year, and then use -areg- to control for each group? I think that would capture the desired effects.
> In that case it would be something like:
> Egen id=group(country1 country2 year)
> Areg ..., abs(id)

That will obviously fail. Imagine a standard panel of N countries and T years. Your group id will have N*T values, exactly equal to the size of the dataset. Adding another dimension of countries doesn't change that. The point of doing two-way or three-way fixed effects is that they independently identify the unit (or units) and the time period, without interactions.

You probably should use this trick to identify country-pairs, though. Do an egen group to create an index of each distinct country-pair, tsset the data by that variable and year, run xtreg, fe with a set of year dummies. Downstream, just use the drop() or keep() options in a program like Ben Jann's estout (on SSC) to retain the coefficients you want to see in the LaTeX table (or whatever).

Kit Baum   |   Boston College Economics & DIW Berlin   |
                              An Introduction to Stata Programming  |
   An Introduction to Modern Econometrics Using Stata  |

*   For searches and help try:

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