analyses of adherence

13 Mar 2018, 03:53

Dear all,

Currently I am working on medication database and trying to calculate of proportion of days covered (PDC; used in analyses of adherence).
I have never used STATA before so I am facing problem in every step of my analysis. Data looks as below:

According to this article following 4 steps are needed:
Step 1: Determine the patient’s measurement period, defined as the index prescription date to the end of the calendar year, disenrollment, or death.

Step 2 Within the measurement period, count the days the patient was covered by at least one drug in the class based on the prescription fill date and days of supply. If prescriptions for the same drug (GCN) overlap, then adjust the prescription start date to be the day after the previous fill has ended.

Step 3 Divide the number of covered days found in Step 2 by the number of days found in Step 1. Multiply this number by 100 to obtain the PDC (as a percentage) for each patient.

Step 4 Count the number of patients who had a PDC greater than 80% and then divide by the total number of eligible patients.

You'll increase your chances of a helpful answer by following the FAQ on asking questions - provide Stata code in code delimiters, readable Stata output, and sample data using dataex. It is also better if you don't have a pile of questions all at once.

You need to make sure Stata understands that you have dates. So first, move from strings to dates - see User Guide and other documentation on this. You can use egen with by and max to identify the last date for an id or you just do by id and the last observation will be observation _N.