Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: fixed effects regression with indicator variables

From   "Erik Ø. Sørensen" <>
Subject   Re: st: fixed effects regression with indicator variables
Date   Thu, 31 Oct 2002 08:03:55 -0500

On torsdag, okt 31, 2002, at 01:20 America/Montreal, Sangho Kim wrote:

Dear Statalister,

I am wondering if it's possible to use xtreg, fe regression for the
fixed-effects model with indicator variables. For the indicator
variables, I am using job classifications (worker1-worker10). Especially
I am wondering if I can use xtreg, fe regression in which ALL job dummy
variables (without omitting one of them) are used and a constant term is
also included. Thank you very much for your effort in advance.
I assume the problem is that there are a lot of dummy variables?
A simple way is to
. egen new_group = group(classification_1 classification_2 .... )
and then
. xtreg y x, fe id(new_group)

xtreg imposes that the mean of the categorical new_group dummies are zero, so you get a constant term. If you care mostly about the coefficients on x, this is ok.

Erik Ø. Sørensen, <>.
phd student (economics), Norwegian School of Economics.
currently visiting Queen's University, Kingston Ontario.

* For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index