| |
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: creating retrospective event data
Dear Statalisters,
I have data for one wave that asks people about the month and year
various events took place in their past. For example, what month/year
were you married (assuming ever married) and what month/year did
marriage end (assuming marriage ended). I want to create a data set
that has monthly data for each respondent from 1994-2002. So, let's say
an individual gets married in March of 1998 and divorced in September of
2001. I want to code this individual "0" for all months from January of
1994 through February of 1998; code "1" from March '98 through September
'01, and "0" for October '01 through December of '02.
I thought I could create a married start date variable m1sd=1998m3 and
marriage end date variable m1ed=2001m9 and find a way to code whether or
not Jan94 falls between those dates, Feb94, Mar94 through Dec02; if yes
the Jan94_married=1 and on and on through all the months across all the
years. Originally I thought I could use the tin command but that doesn't
seem to be working. It seems like there should be a simple solution to
this but I can't find one in the archives or the help commands. I'm
probably using the wrong words to search.
To clarify:
Here's what I have:
1. How many times married? (0-3)
2. Month first marriage began? (1-12)
3. Year first marriage began? (1994-2002)
4. Still married? (yes/no)
5. If no, month first marriage ended? (1-12)
6. Year first marriage ended? (1994-2002)
7. If married twice: month second marriage began? (1-12)
8. year second marriage began? (1994-2002)
9. Still married?
10. and so on....
I want:
1/1994 2/1994 3/1994..... 3/1998 4/1998 ....9/2001
10/2001..12/2002
Person 1 0 0 0 0 1 1 1
1 0 0 0
Can anyone help me with this or point me in right direction?
Thanks,
Kelly
*
* 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/