I have a dataset where patientes 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 earliest date for specific ID variables
MGARCH DVECH for panel dataDear all, I am trying to estimate Diagonal VECH GARCH(1,1) model for a panel of 600 firms (ID) and …
Using bayesstats summary on pooled multiple chain data.Dear Statalisters, Is there a way to summarize amalgamated data from multiple chains with bayesstats…
Counting observations over duplicate datesHi all, I'm an economics student in college, doing my best to learn STATA. I've browsed the forum a…
convergent validityHow would I calculate the convergent validity of two diagnostic tests where both outcome measures ar…
Hausman testI want to investigate if I have to use a random effects or fixed effects model. Therefore I run the …
Subscribe to:
Post Comments (Atom)
0 Response to How do i drop earliest date for specific ID variables
Post a Comment