ddediu / AdhereR

Computation of adherence to medications from Electronic Healthcare Data in R
26 stars 6 forks source link

Add function(s) to calculate durations of supply using either the forwards or reverse waiting time distribution #145

Open Masswear opened 3 years ago

Masswear commented 3 years ago

One of the greatest limitations in EHD adherence research is the lack of doses, or durations of supply in many data sets. Having the ability to calculate durations of supply using either the forwards or reverse waiting time distribution would be a useful feature in AdhereR. There is a function in the Stata package, wtdttt, and here are some references:

  1. Bødkergaard K, Selmer RM, Hallas J, et al. Using the waiting time distribution with random index dates to estimate prescription durations in the presence of seasonal stockpiling. Pharmacoepidemiol Drug Saf. 2020;29(9):1072-1078. doi:10.1002/pds.5026.
  2. Hallas J, Gaist D, Bjerrum L. The waiting time distribution as a graphical approach to epidemiologic measures of drug utilization. Epidemiology. 1997;8(6):666-670. doi:10.1097/00001648-199710000-00009.
  3. Pottegård A, Hallas J. Assigning exposure duration to single prescriptions by use of the waiting time distribution. Pharmacoepidemiol Drug Saf. 2013;22(8):803-809. doi:10.1002/pds.3459.
mbg-unsw commented 1 year ago

I've translated a couple of the functions from wtdttt into R, perhaps they could be used as a starting point for this feature.

Please see https://github.com/mbg-unsw/Rwtd

ddediu commented 1 year ago

Hi Malcom, thanks for the pointer, I'll look into it (hopefully soon, depending on my workload), but I might have questions :) Best, Dan