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
Divide the string including chinese into two columnsdear sir: I want to know how to divide the following strings into two columns, one for Chinese chara…
repeating iterations with unchanging log likelihood valuesGreetings all, I am using meqrlogit to predict binary outcome (use of potentially harmful medicatio…
Contingent Valuation MethodHi! I am trying to make a study in regards to contingent valuation method using logit, which is in m…
Omitted variables in results using OLS modelDear All, I am analyzing data household level data and have included 10 provinces. I have also cate…
Harrell's C stat after multiple imputationDear all, I am having problems figuring out how to calculate Harell's C-stat following stcox on imp…
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