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

st: creating a dummy


From   "Tumur Gunchinmaa" <t.gunchinmaa@stud.man.ac.uk>
To   statalist@hsphsun2.harvard.edu
Subject   st: creating a dummy
Date   Wed, 25 Feb 2004 16:41:57 -0000

Hi,
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

Many thanks,
Gunche
School of Economic Studies
University of Manchester
Oxford Road 
Manchester
M13 9PL
Tel +44-(0)161-275-4624
Fax +44-(0)161-275-4928
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index