Dear Statalists,
I have a dataset (long format) which contains id_doctor, id_patients, date_clinic, date_intervention, testing_yn.
For each id_doctor, there are different patients.
For each id_patients, they might have 1 or more clinic visist dates (date_clinic)
Intervention was given on doctors. Each doctor serves as his/her own control, i.e., they are in intervention phase after the date_intervention (different intervention dates for the doctors) and they were in control phase before that. Study started on 1st Jan 2010 and study ended on 31st May 2011.
testing_yn means 0 for no testing and 1 for testing.
My question is how I am able to calculate the weekly and fortnightly rates of testing for each doctor.
P.S. The dates are not random dates between 1st Jan 2010 and 31st May 2011 (They are NOT consecutive in my dataset).
Many thanks,
Sapphire
I have a dataset (long format) which contains id_doctor, id_patients, date_clinic, date_intervention, testing_yn.
For each id_doctor, there are different patients.
For each id_patients, they might have 1 or more clinic visist dates (date_clinic)
Intervention was given on doctors. Each doctor serves as his/her own control, i.e., they are in intervention phase after the date_intervention (different intervention dates for the doctors) and they were in control phase before that. Study started on 1st Jan 2010 and study ended on 31st May 2011.
testing_yn means 0 for no testing and 1 for testing.
My question is how I am able to calculate the weekly and fortnightly rates of testing for each doctor.
P.S. The dates are not random dates between 1st Jan 2010 and 31st May 2011 (They are NOT consecutive in my dataset).
Many thanks,
Sapphire
Comment