Statalist


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

st: RE: creating a large set of dummies


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   st: RE: creating a large set of dummies
Date   Tue, 19 Aug 2008 10:14:59 +0200

Well, with the example from Baum (2006, ch. 9.1.1), it is easy to see that the -xtreg, fe- estimator is equivalent to the inclusion of a large set of dummies.

*********
u http://www.stata-press.com/data/imeus/traffic, clear
*FE Estimator
qui xtreg fatal beertax spirc unrate perincK, fe
qui estimates store fe
*Inclusion of Dummies
qui ta state, gen(state_dum_)
qui reg fatal beertax spirc unrate perincK state_dum_*
qui estimates store reg
*Comparison
estimates table fe reg, style(oneline)
*********

HTH
Martin

Baum (2006), An Introduction to Modern Econometrics Using Stata, Stata Press

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Jan Sauermann
Sent: Tuesday, August 19, 2008 9:44 AM
To: [email protected]
Subject: st: creating a large set of dummies

Dear Statalisters,

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-

Kind regards,

Jan

--
Jan Sauermann (<[email protected]>)
Research Centre for Education and the Labour Market (ROA) / Maastricht
University

P.O. Box 616 | NL - 6200 MD Maastricht
office: +31.43.3883801 | mobile: +31.655853921
<http://www.roa.unimaas.nl>
*
*   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/



*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index