Hi Statalist,
I am looking at clinical event data. In this data we have an participant ID, their symptom e.g. cough, their symptom score at baseline from 0 (no problem) to 3 (severe problem) their daily diary scores of this symptom (days 1 -28 but in the dummy data below I have just used days 1 -10) and the date of their daily diaries. From this data I am trying to work out the start date of the clinical event - this is the first day that the symptom score increased from baseline. The data I am working with only contains participants where this has happened (which helps). On top of this I would then like to figure out the date that the score returned to the same as the baseline score or lower, and therefore creating an end date of the clinical event. I have experience in Stata but I do not even know where to start to tackle this. I have created some dummy data below.
A clinical event starts on day 4 and ends on day 10
B clinical event starts on day 6 and ends on day 7
C clinical event starts on day 4 and ends on day 8
D clinical event starts on day 6 and does not end/resolve
E clinical event starts on day 7 and ends on day 10
F clinical event starts on day 3 ends on day 4 but starts again on day 6 and then ends on day 9
G clinical event starts on day 8 and ends on day 10
Any help for this would be much appreciated.
Many thanks,
Jenna
I am looking at clinical event data. In this data we have an participant ID, their symptom e.g. cough, their symptom score at baseline from 0 (no problem) to 3 (severe problem) their daily diary scores of this symptom (days 1 -28 but in the dummy data below I have just used days 1 -10) and the date of their daily diaries. From this data I am trying to work out the start date of the clinical event - this is the first day that the symptom score increased from baseline. The data I am working with only contains participants where this has happened (which helps). On top of this I would then like to figure out the date that the score returned to the same as the baseline score or lower, and therefore creating an end date of the clinical event. I have experience in Stata but I do not even know where to start to tackle this. I have created some dummy data below.
ID | Symptom | Baseline | Diaryday1 | Diaryday2 | Diaryday3 | Diaryday4 | Diaryday5 | Diaryday6 | Diaryday7 | Diaryday8 | Diaryday9 | Diaryday10 | Diarydate1 | Diarydate2 | Diarydate3 | Diarydate4 | Diarydate5 | Diarydate6 | Diarydate7 | Diarydate8 | Diarydate9 | Diarydate10 | ||||||||||||||||||
A | Cough | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 2 | 2 | 1 | 0 | 01/12/2020 | 02/12/2020 | 03/12/2020 | 04/12/2020 | 05/12/2020 | 06/12/2020 | 07/12/2020 | 08/12/2020 | 09/12/2020 | 10/12/2020 | ||||||||||||||||||
B | Cough | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 03/05/2021 | 04/05/2021 | 05/05/2021 | 06/05/2021 | 07/05/2021 | 08/05/2021 | 09/05/2021 | 10/05/2021 | 11/05/2021 | 12/05/2021 | ||||||||||||||||||
C | Cough | 1 | 1 | 1 | 1 | 2 | 2 | 2 | 2 | 1 | 0 | 0 | 06/06/2021 | 07/06/2021 | 08/06/2021 | 09/06/2021 | 10/06/2021 | 11/06/2021 | 12/06/2021 | 13/06/2021 | 14/06/2021 | 15/06/2021 | ||||||||||||||||||
D | Cough | 2 | 2 | 2 | 2 | 2 | 2 | 3 | 3 | 3 | 3 | 3 | 07/08/2021 | 08/08/2021 | 09/08/2021 | 10/08/2021 | 11/08/2021 | 12/08/2021 | 13/08/2021 | 14/08/2021 | 15/08/2021 | 16/08/2021 | ||||||||||||||||||
E | Cough | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 3 | 3 | 3 | 2 | 09/08/2021 | 10/08/2021 | 11/08/2021 | 12/08/2021 | 13/08/2021 | 14/08/2021 | 15/08/2021 | 16/08/2021 | 17/08/2021 | 18/08/2021 | ||||||||||||||||||
F | Cough | 0 | 0 | 0 | 1 | 0 | 0 | 2 | 2 | 2 | 0 | 0 | 12/12/2021 | 13/12/2021 | 14/12/2021 | 15/12/2021 | 16/12/2021 | 17/12/2021 | 18/12/2021 | 19/12/2021 | 20/12/2021 | 21/12/2021 | ||||||||||||||||||
G | Cough | 2 | 1 | 1 | 1 | 1 | 1 | 2 | 2 | 3 | 3 | 2 | 01/02/2022 | 02/02/2022 | 03/02/2022 | 04/02/2022 | 05/02/2022 | 06/02/2022 | 07/02/2022 | 08/02/2022 | 09/02/2022 | 10/02/2022 |
A clinical event starts on day 4 and ends on day 10
B clinical event starts on day 6 and ends on day 7
C clinical event starts on day 4 and ends on day 8
D clinical event starts on day 6 and does not end/resolve
E clinical event starts on day 7 and ends on day 10
F clinical event starts on day 3 ends on day 4 but starts again on day 6 and then ends on day 9
G clinical event starts on day 8 and ends on day 10
Any help for this would be much appreciated.
Many thanks,
Jenna
Comment