Dear Stata users,
I am looking at medication use from the 2 years before and after the event in patients with chronic kidney disease. I would like to divide time before and after event into 3 months quarters, numbering the 8 quarters before the event as -Q8 to -Q1 and after the event as Q1 to Q8 and examine the medication use (14 classes of medications) in each quarter. I would really appreciate If anyone may help me with the analysis.
Data looks as below.
Many thanks.
Sincerely,
Oyun
I am looking at medication use from the 2 years before and after the event in patients with chronic kidney disease. I would like to divide time before and after event into 3 months quarters, numbering the 8 quarters before the event as -Q8 to -Q1 and after the event as Q1 to Q8 and examine the medication use (14 classes of medications) in each quarter. I would really appreciate If anyone may help me with the analysis.
Data looks as below.
PHP Code:
[CODE]
* Example generated by -dataex-. To install: ssc install dataex
clear
input byte ID str9 atc5 float(supply_date event_date)
2 "A10AD05" 16672 16672
2 "C02AC04" 17484 16672
2 "C06AD05" 17402 16672
2 "A10AC04" 18215 16672
2 "A01AD05" 15576 16672
2 "B01AC04" 16023 16672
3 "C10AA05" 17484 16672
3 "B01AC04" 17698 17020
3 "A01AD05" 15506 17020
3 "B01AC04" 16237 17020
3 "A01AD05" 16602 17020
end
format %td supply_date
format %td event_date
[/CODE]
Many thanks.
Sincerely,
Oyun
Comment