Hi all,
I have a dataset in long format (multiple measurements per patient) with a continuous variable (creat) for serum creatinine values and a date variable (dt_creat) representing the date in which the creatinine values have been measured. I would like to:
1) create a variable representing the peak value for creat for a given patient
2) create a variable representing the date of the peak value
I can do the first using egen max, but can't figure out how to do the second. Using Stata version 13.1.
Any help would be appreciated.
Thanks,
Manuel Ferraro
I have a dataset in long format (multiple measurements per patient) with a continuous variable (creat) for serum creatinine values and a date variable (dt_creat) representing the date in which the creatinine values have been measured. I would like to:
1) create a variable representing the peak value for creat for a given patient
2) create a variable representing the date of the peak value
I can do the first using egen max, but can't figure out how to do the second. Using Stata version 13.1.
Any help would be appreciated.
Thanks,
Manuel Ferraro
Comment