From | "Nick Cox" <[email protected]> |
To | <[email protected]> |
Subject | st: RE: creating a dummy |
Date | Wed, 25 Feb 2004 16:55:52 -0000 |
sounds like bysort id : gen byte repeats = _N > 1 Nick [email protected] Tumur Gunchinmaa My data is in a long format. I would like to create a dummy which count the i (unique value variable). Basically, dum=1 if i is specified more than once. For example, id year inc 1 80 5000 1 81 5500 1 82 6000 2 81 5000 3 81 6500 3 82 7000 * * 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 |