Statalist


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

Re: st: creating a large set of dummies


From   Maarten buis <maartenbuis@yahoo.co.uk>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: creating a large set of dummies
Date   Tue, 19 Aug 2008 09:21:38 +0100 (BST)

--- Jan Sauermann <jan.sauermann@gmail.com> 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

http://home.fsw.vu.nl/m.buis/
-----------------------------------------

Send instant messages to your online friends http://uk.messenger.yahoo.com 
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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