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

st: Rearranging dates for multiple records


From   Hannah Moore <[email protected]>
To   [email protected]
Subject   st: Rearranging dates for multiple records
Date   Thu, 22 Jul 2004 14:57:24 +0800

Hello, I am a relatively new STATA user.
In my dataset I have multiple records for every individual according to how many observations they have had. Each individual is identified by a username and within each username each record is identified by a unique number starting from 0, 1, 2, etc up to 9. I also have up to 9 variables that are dates of the observations, plus an entry date into the study and an exit date.

What I would like to do is for every individual, create an "entry" variable and an "exit" variable that is for

the first record: entry = entry date , exit = date observation 1
second record: entry = date observation1, exit = date observation3
third record: entry = date observation3, exit = date observation4
etc etc
until the last record: entry = date last observation, exit = exit date

Can anyone help me? The observations are also of 2 types and I would also like to create variables in a similar fashion to "entry" and "exit" according to what type of observation it is.

I look forward to anyones response

Regards
Hannah Moore
[email protected]
--
_________________________________________
Hannah Moore BSc(Hons)
Research Assistant

InterRett - IRSA Rett Phenotype Database
Australian Rett Syndrome Study

Telethon Institute for Child Health Research
PO Box 855, West Perth
AUSTRALIA, 6872
Ph: +61 (8) 9489 7781
Fax: +61 (8) 9489 7700
Mob: 0409 100 007
Email: [email protected]
:)
__________________________________________

*
* 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