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
Efficient Way to Reform Repeated Codes with IF conditionDear experts, For the following repeated codes : tab1 variable1 if (variableA == 1) & (variab…
Marginsplot Predicted Probabillity Bar GraphDoes know how to perform a marginsplot to predict the probability of two categorical variables (e.g.…
Help with Randomly Drawing 500 Observations from DistributionDear all, I am using Stata 16, on mac. I was wondering if I wanted to randomly draw 500 observation…
spmap and spkde - How to create a "heatmap"?Dear Statalist, In this example: page 45 https://www.stata.com/meeting/german...g12_pisati.pdf Mauri…
explained varianceHello I have calculated a multilevel interaction effect using gsem, very much the same as example 38…
Subscribe to:
Post Comments (Atom)
0 Response to How do i drop earliest date for specific ID variables
Post a Comment