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
Time to event graphHi, I am really appreciative of all the help that is provided here. Thank you very much. I am trying…
append error (r198)Dear Madam/Sir, I am a beginner for STATA. It will be highly appreciative if you can advise me how …
How does Stata plot the probability density function f (x) on the vertical axis and the quantile (0 to 1) on the horizontal axis?How does Stata plot the probability density function f (x) on the vertical axis and the quantile (0 …
synth_runner packageHello, I am working on a comparative case-study using the synthetic control method (traditionally im…
Convert export values to USDHello, I have a dataset that looks like with trade data from 1988-2017 Code: * Example generated b…
Subscribe to:
Post Comments (Atom)
0 Response to quick help on identifying the first admission date
Post a Comment