Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: re: combining and generating dummy variables


From   Kit Baum <[email protected]>
To   [email protected]
Subject   st: re: combining and generating dummy variables
Date   Sat, 22 Nov 2008 11:17:03 -0500

<>
Reto said

I have a dataset with about 100 dummy variables for companies (say
c1-c100) and another 100 dummy variables for Month-year-combinations
(say mo1-mo100). Now I would like to create 10'000 dummy variables
labeled c1mo1-c100mo100 and their values c1*mo1 to c100*mo100.



Unless you have Stata/SE or Stata/MP with plenty of RAM on your machine, you cannot do this at all (see -help limits-). But why would you want to do it anyway? Normally if you want to deal with two-way fixed effects (by company and time period) you use a set of company dummies and a set of time dummies (usually by allowing xtreg,fe to generate the former automatically). But if you create a dummy that identifies each (i,t), you can't very well include the set of those dummies in a model, because there will be one for every observation.

Kit Baum, Boston College Economics and DIW Berlin
http://ideas.repec.org/e/pba1.html
An Introduction to Modern Econometrics Using Stata:
http://www.stata-press.com/books/imeus.html


*
*   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