[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: creating a large set of dummies

From   Maarten buis <[email protected]>
To   [email protected]
Subject   Re: st: creating a large set of dummies
Date   Tue, 19 Aug 2008 09:21:38 +0100 (BST)

--- Jan Sauermann <[email protected]> wrote:
> for a regression, I need a large set of dummies for controlling for
> individual fixed effects. This can easily be done by -tab VAR,
> gen(NEWVAR)-. Of course, lots of variables are created just for a
> single regression.
> My question: is there a way to tell Stata that it should include a
> dummy for each value of a certain variable without having to create a
> single dummy for each value? In my understanding, this would be
> similar to the use of lagged variables where you type -L.VAR-

Yes, see -help xi-. However, if you are interested in estimating a
fixed effects regression it is probably better to use -xtreg- with the 
-fe- option (using the logic that it is better not to reinvent stuff
that has already been implemented by the good people from StataCorp).

-- Maarten

Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands

visiting address:
Buitenveldertselaan 3 (Metropolitan), room Z434

+31 20 5986715

Send instant messages to your online friends 
*   For searches and help try:

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