Hey there,
I have a dataset consisting of the two variables below (ID-number and admission date) with a total of approx. 15.000 entries. A majority of the patients have been readmitted more than once so there is multiple admission dates for the same ID-number (as shown below). As one of my first steps, I want to create a new variable identifying the first admission for each ID-number. So if a patient has been readmitted more than once, I am only interested in their first admission as a basis for further analysis. I am a bit lost on how to approach this, so any help or tips would be much appreciated.
Many thanks in advance.
Bjørn
ID-number admission date (date variable)
00002678 04/02/2013
00002309 23/03/2011
00002309 08/12/2012
00002309 03/02/2013
00001988 27/05/2017
00006783 12/10/2014
00006783 17/04/2018
00002890 25/12/2019
00009764 11/07/2011
00003432 17/04/2014
00003432 21/06/2014
00003432 29/07/2014
etc.
Related Posts with quick help on identifying the first admission date
Escape code tags?\ Code: \ …
Conditioning for values within a variable while using foreachHi everyone! I'm new to the forum, but here it goes. I have the following code, where I'm just tryin…
Convergence not achieved with xtlogit, fe, but it does converge with xtlogit, reI am using xtlogit on the following data: input str2 st int date byte club float(combo l ca com) by…
Line graph of the mean of all observationsHello all, I have data that have three variables: vehicle id, speed_kmh, and Time_of_Travel. I am …
error obtaining starting values; try fitting a marginal model in order to diagnose the problemHi Statalist First time poster, long time reader here. I have searched the list and online for answ…
Subscribe to:
Post Comments (Atom)
0 Response to quick help on identifying the first admission date
Post a Comment