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" <[email protected]>
To   [email protected]
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
--
Erik �. S�rensen, <http://www.geocities.com/erik_oiolf/>.
phd student (economics), Norwegian School of Economics.
currently visiting Queen's University, Kingston Ontario.

*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/




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