Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: get a dummy for year*region


From   John Hennen <[email protected]>
To   [email protected]
Subject   st: get a dummy for year*region
Date   Tue, 10 Sep 2002 17:31:45 -0400

Marcelo Moreira wrote:

> Hi there.
>
> I would like to know how I can get a dummy for each possible
> combination between year and region.
>
> I tried:
>
> tab region your, gen(dummy)
>
> But it doesnt work. Any hints?
>
> RESPONSE:

try:
tempvar x
egen `x' = group(region year)
tab `x', gen(dummy)

john





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

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