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?
svg layers disappearingHi all, I'm hoping for some advice in trouble shooting. I'm having trouble export svg files - my la…
Storing vec coefficientHi, I have tried to store the coefficient of the vec results. The code I used is as below. Code:…
How to hide a specific line property appears in x axis in twoway plot?Dear Stata users, I want to hide a specific line that appears in the x-axis. Here is my code for two…
vce(cluster) with lsdvcHello..i am stata 13 user. I want to integrate vce (cluster) with xtlsdvc Log_sales varietyofproduct…
Binary Response ModelI want to estimate the probability of authoritarian leadership failure as a function of five explana…
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