Dear all,
thanks in advance.
I have a dataset of 900 patients followed for one year, organized into two departments (oncology, cardiology).
Among these patients, I have information about their age, sex, admission_date, length_of_stay, discharge_date and mortality outcome at discharge (variable "outcome", which can have a value of 1 for deceased or 0 for alive).
Is there a way in STATA to calculate month-specific incidence rates? For example: the number of deaths in March divided by person-days in March.
I'm unsure if there's a way to account for the fact that some patients have admission days spread across multiple months.
Some time ago, if I remember correctly, I had used stpstime, but I was in a slightly different situation, and this command doesn't seem appropriate now.
thanks in advance.
I have a dataset of 900 patients followed for one year, organized into two departments (oncology, cardiology).
Among these patients, I have information about their age, sex, admission_date, length_of_stay, discharge_date and mortality outcome at discharge (variable "outcome", which can have a value of 1 for deceased or 0 for alive).
Is there a way in STATA to calculate month-specific incidence rates? For example: the number of deaths in March divided by person-days in March.
I'm unsure if there's a way to account for the fact that some patients have admission days spread across multiple months.
Some time ago, if I remember correctly, I had used stpstime, but I was in a slightly different situation, and this command doesn't seem appropriate now.
Code:
* Example generated by -dataex-. For more info, type help dataex clear input float(id age sex admission_date length_of_stay discharge_date outcome) str10 department 1 54.61835 0 23364 17.857428 23381.86 1 "cardiology" 2 45.71597 0 23331 14.076464 23345.076 0 "oncology" 3 58.9018 0 23027 7.090492 23034.09 0 "oncology" 4 58.87616 0 23184 17.30037 23201.3 0 "oncology" 5 63.64021 0 23240 21.30667 23261.307 1 "cardiology" 6 57.74791 0 23065 25.892675 23090.89 0 "cardiology" 7 70.58585 1 23278 13.036489 23291.04 1 "oncology" 8 53.71004 1 23060 35.847523 23095.85 0 "cardiology" 9 58.72459 0 23030 22.15348 23052.154 1 "oncology" 10 39.22841 1 23078 19.79576 23097.795 0 "cardiology" end
Comment