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

st: Re: Stata, create a special dummy


From   "Marcela Perticara" <mperticara@uahurtado.cl>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: Re: Stata, create a special dummy
Date   Fri, 17 Jun 2005 17:17:01 -0400

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: statalist@hsphsun2.harvard.edu
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/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index