I have a dataset where patients have specific ID-numbers. They also have one specific ID for every time they have been admitted to the hospital, which means that there are several of the same ID's but with different dates. I only need the first admission, so i need to figure out how i drop all variables with the same ID except the ID-number with the first admission. I hope that makes sense and that you can help. Thank you.
Example:
ID: 0000012354 Admissiondate: 04 mar 13
ID: 0000012354 Admissiondate: 07 jun 14
ID: 0000012354 Admissiondate: 12 jan 16
All the best
Jonas
Related Posts with How do i drop all dates, except the earliest date for specific ID variables
Hierarchical Cluster Analysis (Centroid Linkage): currently can't handle dendrogram reversalsHello Everyone, I am having an issue displaying a hierarchical cluster analysis dendrogram using ce…
HH dataHello please, am new with stata. i want to do household analysis, please what is the way forward …
Merge weekly and daily dataHi everyone, I am new here so I will try my best to make my question as clear as possible. Hope you …
How to compare two coefficients over 2 equationsHello good people, I have a question regarding my approach of analyzing data for a project. # I have…
Cross-sectional regressionHello guys, I was wondering if anyone had experience with such regressions. I have a panel data. W…
Subscribe to:
Post Comments (Atom)
0 Response to How do i drop all dates, except the earliest date for specific ID variables
Post a Comment