I have a focused question. I am working in long format. One of my variables is called “new_diff_days”, which is the absolute # of days between each participant’s birthday (month and day - not DOB) and the date of each participants HbA1c test from a merged baseline study plus a registry-based data set. Of course, each participant has a numeric ID_number I want to only keep the lowest # of days between each individual participant's birthday and the date of their HbA1c test (“new_diff_days”) for each year (e.g., 2010) that one or many HbA1c tests (HbA1c_mmolmol) was done (“y_status_dato”) during the time period of 2008 to 2020. How would you write code for that?
Related Posts with How do I keep the lowest numeric value for a variable on an annual basis over time?
Help with Stochastic Frontier Analysis/Translog Cost Function in Stata 15, bc95 modelDear Stata users, I am using Stata 15 and I am quite new in using this software. I am working on a…
How to identify all cases with missing observationDear All How can I identify and list all cases with missing observation(denoted by .a) from a data …
Putexcel modify not workingDear all, I am writing to ask for a problem on the putexcel modify. I have an existing excel xls. f…
Sample size for 3 arm, 2 comparison sub-studyHi, I am looking to power a sub-study within a larger 2 arm randomised study. The outcome is a cont…
Collapse by several variablesHi, I am working with panel data where I have 9 different regions and in each region there are a dif…
Subscribe to:
Post Comments (Atom)
0 Response to How do I keep the lowest numeric value for a variable on an annual basis over time?
Post a Comment