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?
Merging panel data and analysisHello everyone, I intend to analyse panel data (long format) on effects of individuals taking a par…
PkequivHi, I am using the pkequiv function to compare plasma levels between two medicinal solutions, do i n…
Problem in using ivregress 2sls command in oaxacaHi everyone, I'm getting errors when I run the following code: oaxaca y x1 x2...x10, by(caste) poo…
Mean comparisonsing survey data in the following arrangement: Group: Firm_investment Q1 - each question has 1,2,3,…
Power calculations with IVHello (from a new member), Can someone guide me on how to do power calculations in stata to show th…
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