Hi,
I would like to obtain a variable with a certain lab value (GFR) that is closest to a specific date (date of blooddraw). I have 1 to 4 different GFRs per observation and would like to use the one that is closest to the blooddraw.
The format of the data looks like this :
Do you think there is a way to generate a GFR that is closest to troughleveldate?
Thank you in advance,
Mia Lidén
I would like to obtain a variable with a certain lab value (GFR) that is closest to a specific date (date of blooddraw). I have 1 to 4 different GFRs per observation and would like to use the one that is closest to the blooddraw.
The format of the data looks like this :
Id | troughleveldate | rcreatdate1 | GFR1 | rcreatdate2 | GFR2 | rcreatdate3 | GFR3 | rcreatdate4 | GFR4 |
1 | 04feb2019 | 02feb2019 | 100.45 | 04feb2019 | 89.76 | . | . | . | . |
2 | 08mar2019 | 06mar2019 | 79.41 | 07mar2019 | 80.07 | 08mar2019 | 94.2 | . | . |
Thank you in advance,
Mia Lidén
Comment