Quantcast
Channel: Statalist
Viewing all articles
Browse latest Browse all 65593

Finding first event

$
0
0
Dear all. Hopefully an easy question for those who work with STATA more regularly

I have a database with where I want to find the first event of several possible events (the first registered disease of a specific type). Data is stored with one variable defining if the subject has experienced the event or not (0,1), and one variable with that particular date (stored as numeric faily date (long)). Any subject could experience several different events during their lifetime.

I want to find the first event, and the time when it occured, for each person who has experienced any event. Could manually go through the database but > 20.000 subjects and 14 possible events makes that not so much fun =)

Any hints would be greatly appreciated.

Best

Johannes

Viewing all articles
Browse latest Browse all 65593


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>