Hi guys
I am new to stata and data analysis so please bare with my descriptions due to my limited knowledge as I am still learning.
I cannot display my data due to confidentiality reasons but I will input an example.
My issue is that I am analysing certain illnessess and want to group 20 of them into one to be under related illnessess.
i have category x which is the main illness which is cancer
i know the date of diagnosis of cancer
I need to find the date first related illness was coded by the practitioner and the time lapsed between this first interaction to the date of cancer diagnosis.
I hope i have explained this sufficiently.
my dates are have been changed to numeric my issue is just grouping these co morbidities and then figuring out how to get the first code in each series per patient id.
sorry if this explained badly, I definately need more practise with this.
Date looks something like:
generated a variable diagnosis date based on the first date a patient id presented a cancer code issued to them. as you can see one patient can have hundreds of codes issued to them in the sample and i want to group a set of 20 under one category.
Hope someone can help
Lou
I am new to stata and data analysis so please bare with my descriptions due to my limited knowledge as I am still learning.
I cannot display my data due to confidentiality reasons but I will input an example.
My issue is that I am analysing certain illnessess and want to group 20 of them into one to be under related illnessess.
i have category x which is the main illness which is cancer
i know the date of diagnosis of cancer
I need to find the date first related illness was coded by the practitioner and the time lapsed between this first interaction to the date of cancer diagnosis.
I hope i have explained this sufficiently.
my dates are have been changed to numeric my issue is just grouping these co morbidities and then figuring out how to get the first code in each series per patient id.
sorry if this explained badly, I definately need more practise with this.
Date looks something like:
id | illnesscodes | datecodedbygp | cancer | |
1 | M35T00 | 09nov1998 | 1 | |
1 | M34y00 | 10sep2000 | . | |
1 | M29y00 | 18mar2001 | . | |
1 | . |
Hope someone can help
Lou