Chek the command
duplicates tag varlist, gen(newvar)
where in varlist you should include all the variables that define a record
(in your example men and date).
--------------------------------------------------------------------------
Profesor Asistente, Universidad Alberto Hurtado
Professorial Lecturer, Georgetown University
Erasmo Escala 1835, Santiago (Chile)
Phone: 692-0267
Fax: 692-0303
http://www.uahurtado.cl/economia
----- Original Message -----
From: Michele Favre M.
To: [email protected]
Sent: Friday, June 17, 2005 4:45 PM
Subject: st: Stata, create a special dummy
I need help with some Stata command that I haven't been able to find.
I have a panel data like the following
Men Fund Date
Dummy
1 A 20040630 0
1 A 20040730 0
1 A 20040830 1
1 B 20040830 1
1 B 20040930 0
2 C 20040630 1
2 D 20040630 1
2 D 20040730 0
3 C 20040630 0
3 C 20040730 0
3 C 20040830 0
3 C 20040930 1
3 D 20040930 1
As you can see, I have multiple observations per person at a single date,
and I need a command that helps me create a Dummy, as shown in the example
above. Because I have to consider only one move per month (no matter the
fund) , for example I have to consider for Men=1 only 4 observations
(notwithstanding there are 5 observations for Men = 1).
Michele Favre Morel
Economista
Servicio de Estudios BBVA
*
* 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/